nixos-dots

nixos dots
git clone git://popovic.xyz/nixos-dots.git
Log | Files | Refs

r2d2.nix (1350B)


      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 ../modules/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   home.packages =
     23     (
     24       with packageSets;
     25       lib.flatten [
     26         system
     27         shell
     28         cli
     29         network
     30         development
     31       ]
     32     )
     33     ++ [ pkgs.lf ];
     34 
     35   home.file =
     36     let
     37       mkDotfileLink = path: {
     38         source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/${path}";
     39         recursive = true;
     40       };
     41     in
     42     {
     43       ".zshenv" = mkDotfileLink ".zshenv";
     44       ".config/zsh/.zshrc" = mkDotfileLink ".config/zsh/.zshrc";
     45       ".config/shell" = mkDotfileLink ".config/shell";
     46       ".config/git" = mkDotfileLink ".config/git";
     47       ".config/nvim" = mkDotfileLink ".config/nvim";
     48       ".config/nix-zsh-plugins.zsh".text = ''
     49         source ${pkgs.zsh-fast-syntax-highlighting}/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
     50         source ${pkgs.zsh-system-clipboard}/share/zsh/zsh-system-clipboard/zsh-system-clipboard.zsh
     51       '';
     52       ".local" = mkDotfileLink ".local";
     53     };
     54 }