Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ❯ cat home.nix
- { config, pkgs, ... }:
- let
- unstable = import (builtins.fetchTarball {
- url = "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz";
- }) { config = config.nixpkgs.config; };
- in
- {
- # Home Manager needs a bit of information about you and the paths it should
- # manage.
- home.username = "owner";
- home.homeDirectory = "/home/owner";
- # This value determines the Home Manager release that your configuration is
- # compatible with. This helps avoid breakage when a new Home Manager release
- # introduces backwards incompatible changes.
- #
- # You should not change this value, even if you update Home Manager. If you do
- # want to update the value, then make sure to first check the Home Manager
- # release notes.
- home.stateVersion = "24.11"; # Please read the comment before changing.
- nixpkgs.config.allowUnfree = true;
- # The home.packages option allows you to install Nix packages into your
- # environment.
- home.packages = [
- # libreoffice-qt-fresh
- # gui-for-singbox
- # # Adds the 'hello' command to your environment. It prints a friendly
- # # "Hello, world!" when run.
- # pkgs.hello
- # # It is sometimes useful to fine-tune packages, for example, by applying
- # # overrides. You can do that directly here, just don't forget the
- # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
- # # fonts?
- # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
- # # You can also create simple shell scripts directly inside your
- # # configuration. For example, this adds a command 'my-hello' to your
- # # environment:
- # (pkgs.writeShellScriptBin "my-hello" ''
- # echo "Hello, ${config.home.username}!"
- # '')
- ];
- xdg.configFile."zsh/.zshrc".force = true;
- home.file.".zshrc".force = true;
- home.backupFileExtension = ".backup";
- # Home Manager is pretty good at managing dotfiles. The primary way to manage
- # plain files is through 'home.file'.
- home.file = {
- # # Building this configuration will create a copy of 'dotfiles/screenrc' in
- # # the Nix store. Activating the configuration will then make '~/.screenrc' a
- # # symlink to the Nix store copy.
- # ".screenrc".source = dotfiles/screenrc;
- # # You can also set the file content immediately.
- # ".gradle/gradle.properties".text = ''
- # org.gradle.console=verbose
- # org.gradle.daemon.idletimeout=3600000
- # '';
- };
- # Home Manager can also manage your environment variables through
- # 'home.sessionVariables'. These will be explicitly sourced when using a
- # shell provided by Home Manager. If you don't want to manage your shell
- # through Home Manager then you have to manually source 'hm-session-vars.sh'
- # located at either
- #
- # ~/.nix-profile/etc/profile.d/hm-session-vars.sh
- #
- # or
- #
- # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
- #
- # or
- #
- # /etc/profiles/per-user/owner/etc/profile.d/hm-session-vars.sh
- #
- programs.direnv = {
- enable = true;
- nix-direnv.enable = true; # this gives us fast "use flake"
- };
- };
- # Let Home Manager install and manage itself.
- programs.home-manager.enable = true;
- programs.kitty = {
- enable = true;
- shellIntegration.mode = "disabled";
- settings = {
- enabled_layouts = "tall:mirrored=true";
- split_axis="horizontal";
- font_family = "FiraCode Nerd Font Mono";
- font_size = 12;
- background_opacity = "0.8";
- confirm_os_window_close = 0;
- tab_bar_style = "powerline";
- # window_margin_width = 10;
- mouse_hide_wait = -1;
- notify_on_cmd_finish = "invisible 20";
- shell = "${pkgs.zsh}/bin/zsh";
- };
- };
- programs.zsh = {
- enable = true;
- enableCompletion = true; # Включить автодополнение
- autosuggestion.enable = true; # Включить подсказки команд
- syntaxHighlighting.enable = true; # Подсветка синтаксиса команд
- history.size = 12000; # Размер истории команд
- plugins = [
- # Плагин для темы Powerlevel10k
- {
- name = "powerlevel10k";
- src = pkgs.zsh-powerlevel10k;
- file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
- }
- # Плагин для вашего файла конфигурации p10k
- {
- name = "powerlevel10k-config";
- src = ./p10k-config; # Каталог рядом с home.nix
- file = "p10k.zsh";
- }
- ];
- oh-my-zsh = {
- enable = true;
- plugins = [ "git" "sudo" "dirhistory" ];
- theme = "robbyrussell";
- };
- initExtra = ''
- # Direnv hook (required for "use flake" to work)
- eval "$(direnv hook zsh)"
- '';
- loginShellInit = ''
- # Ensure zsh is used as login shell
- '';
- };
- # Установить Zsh в качестве оболочки по умолчанию
- home.sessionVariables.SHELL = "${pkgs.zsh}/bin/zsh";
- }
Advertisement
Add Comment
Please, Sign In to add comment