Ilya_konstantinov

Untitled

Aug 20th, 2026
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.05 KB | None | 0 0
  1. ❯ cat home.nix
  2. { config, pkgs, ... }:
  3. let
  4. unstable = import (builtins.fetchTarball {
  5. url = "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz";
  6. }) { config = config.nixpkgs.config; };
  7. in
  8. {
  9. # Home Manager needs a bit of information about you and the paths it should
  10. # manage.
  11. home.username = "owner";
  12. home.homeDirectory = "/home/owner";
  13.  
  14. # This value determines the Home Manager release that your configuration is
  15. # compatible with. This helps avoid breakage when a new Home Manager release
  16. # introduces backwards incompatible changes.
  17. #
  18. # You should not change this value, even if you update Home Manager. If you do
  19. # want to update the value, then make sure to first check the Home Manager
  20. # release notes.
  21. home.stateVersion = "24.11"; # Please read the comment before changing.
  22. nixpkgs.config.allowUnfree = true;
  23. # The home.packages option allows you to install Nix packages into your
  24. # environment.
  25. home.packages = [
  26. # libreoffice-qt-fresh
  27. # gui-for-singbox
  28.  
  29. # # Adds the 'hello' command to your environment. It prints a friendly
  30. # # "Hello, world!" when run.
  31. # pkgs.hello
  32.  
  33. # # It is sometimes useful to fine-tune packages, for example, by applying
  34. # # overrides. You can do that directly here, just don't forget the
  35. # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
  36. # # fonts?
  37. # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
  38.  
  39. # # You can also create simple shell scripts directly inside your
  40. # # configuration. For example, this adds a command 'my-hello' to your
  41. # # environment:
  42. # (pkgs.writeShellScriptBin "my-hello" ''
  43. # echo "Hello, ${config.home.username}!"
  44. # '')
  45. ];
  46. xdg.configFile."zsh/.zshrc".force = true;
  47.  
  48. home.file.".zshrc".force = true;
  49.  
  50. home.backupFileExtension = ".backup";
  51. # Home Manager is pretty good at managing dotfiles. The primary way to manage
  52. # plain files is through 'home.file'.
  53. home.file = {
  54. # # Building this configuration will create a copy of 'dotfiles/screenrc' in
  55. # # the Nix store. Activating the configuration will then make '~/.screenrc' a
  56. # # symlink to the Nix store copy.
  57. # ".screenrc".source = dotfiles/screenrc;
  58.  
  59. # # You can also set the file content immediately.
  60. # ".gradle/gradle.properties".text = ''
  61. # org.gradle.console=verbose
  62. # org.gradle.daemon.idletimeout=3600000
  63. # '';
  64. };
  65.  
  66. # Home Manager can also manage your environment variables through
  67. # 'home.sessionVariables'. These will be explicitly sourced when using a
  68. # shell provided by Home Manager. If you don't want to manage your shell
  69. # through Home Manager then you have to manually source 'hm-session-vars.sh'
  70. # located at either
  71. #
  72. # ~/.nix-profile/etc/profile.d/hm-session-vars.sh
  73. #
  74. # or
  75. #
  76. # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
  77. #
  78. # or
  79. #
  80. # /etc/profiles/per-user/owner/etc/profile.d/hm-session-vars.sh
  81. #
  82. programs.direnv = {
  83. enable = true;
  84. nix-direnv.enable = true; # this gives us fast "use flake"
  85. };
  86. };
  87. # Let Home Manager install and manage itself.
  88. programs.home-manager.enable = true;
  89.  
  90. programs.kitty = {
  91. enable = true;
  92. shellIntegration.mode = "disabled";
  93. settings = {
  94. enabled_layouts = "tall:mirrored=true";
  95. split_axis="horizontal";
  96. font_family = "FiraCode Nerd Font Mono";
  97. font_size = 12;
  98. background_opacity = "0.8";
  99. confirm_os_window_close = 0;
  100. tab_bar_style = "powerline";
  101. # window_margin_width = 10;
  102. mouse_hide_wait = -1;
  103. notify_on_cmd_finish = "invisible 20";
  104. shell = "${pkgs.zsh}/bin/zsh";
  105. };
  106. };
  107.  
  108. programs.zsh = {
  109. enable = true;
  110. enableCompletion = true; # Включить автодополнение
  111. autosuggestion.enable = true; # Включить подсказки команд
  112. syntaxHighlighting.enable = true; # Подсветка синтаксиса команд
  113. history.size = 12000; # Размер истории команд
  114. plugins = [
  115. # Плагин для темы Powerlevel10k
  116. {
  117. name = "powerlevel10k";
  118. src = pkgs.zsh-powerlevel10k;
  119. file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
  120. }
  121. # Плагин для вашего файла конфигурации p10k
  122. {
  123. name = "powerlevel10k-config";
  124. src = ./p10k-config; # Каталог рядом с home.nix
  125. file = "p10k.zsh";
  126. }
  127. ];
  128.  
  129. oh-my-zsh = {
  130. enable = true;
  131. plugins = [ "git" "sudo" "dirhistory" ];
  132. theme = "robbyrussell";
  133. };
  134.  
  135. initExtra = ''
  136. # Direnv hook (required for "use flake" to work)
  137. eval "$(direnv hook zsh)"
  138. '';
  139.  
  140. loginShellInit = ''
  141. # Ensure zsh is used as login shell
  142. '';
  143. };
  144.  
  145. # Установить Zsh в качестве оболочки по умолчанию
  146. home.sessionVariables.SHELL = "${pkgs.zsh}/bin/zsh";
  147.  
  148. }
Advertisement
Add Comment
Please, Sign In to add comment