r2d2.nix (1260B)
1 { 2 config, 3 pkgs, 4 lib, 5 6 ... 7 }: 8 let 9 packageSets = import ../modules/packages.nix { inherit pkgs; }; 10 11 link = config.lib.file.mkOutOfStoreSymlink; 12 inherit (import ../lib/dotfiles.nix) dotfiles; 13 configDirs = builtins.attrNames (builtins.readDir "${dotfiles}/.config"); 14 in 15 { 16 home = { 17 username = "r2d2"; 18 homeDirectory = "/home/r2d2"; 19 stateVersion = "25.11"; 20 }; 21 22 23 home.packages = (with packageSets; lib.flatten [ 24 system 25 shell 26 cli 27 network 28 development 29 ]) ++ [ pkgs.lf ]; 30 31 32 home.file = let 33 mkDotfileLink = path: { 34 source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/${path}"; 35 recursive = true; 36 }; 37 in { 38 ".zshenv" = mkDotfileLink ".zshenv"; 39 ".config/zsh/.zshrc" = mkDotfileLink ".config/zsh/.zshrc"; 40 ".config/shell" = mkDotfileLink ".config/shell"; 41 ".config/git" = mkDotfileLink ".config/git"; 42 ".config/nvim" = mkDotfileLink ".config/nvim"; 43 ".config/nix-zsh-plugins.zsh".text = '' 44 source ${pkgs.zsh-fast-syntax-highlighting}/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 45 source ${pkgs.zsh-system-clipboard}/share/zsh/zsh-system-clipboard/zsh-system-clipboard.zsh 46 ''; 47 ".local" = mkDotfileLink ".local"; 48 }; 49 } 50 51