mika.nix (1656B)
1 { 2 config, 3 pkgs, 4 lib, 5 standalone, 6 7 ... 8 }: 9 let 10 11 packageSets = import ../modules/packages.nix { inherit pkgs; }; 12 13 link = config.lib.file.mkOutOfStoreSymlink; 14 inherit (import ../lib/dotfiles.nix) dotfiles; 15 configDirs = builtins.attrNames (builtins.readDir "${dotfiles}/.config"); 16 in 17 { 18 home = { 19 username = "mika"; 20 homeDirectory = "/home/mika"; 21 stateVersion = "25.11"; 22 }; 23 24 imports = if standalone 25 then 26 [ 27 ../modules/xdg.nix 28 ../modules/nix_settings.nix 29 ../modules/mbsync_timer.nix 30 ../modules/theme.nix 31 ../modules/firefox.nix 32 ] 33 else 34 [ 35 ../modules/mbsync_timer.nix 36 ../modules/theme.nix 37 ../modules/firefox.nix 38 ]; 39 40 nixpkgs = if standalone 41 then { 42 config.allowUnfree = true; 43 } else 44 {}; 45 46 home.packages = with packageSets; lib.flatten [ 47 system 48 shell 49 cli 50 xorg 51 media 52 fileManagement 53 network 54 office 55 email 56 development 57 ]; 58 59 home.file = { 60 ".zshenv".source = link "${dotfiles}/.zshenv"; 61 ".local" = { 62 source = link "${dotfiles}/.local"; 63 recursive = true; 64 }; 65 ".config/nix-zsh-plugins.zsh".text = '' 66 source ${pkgs.zsh-fast-syntax-highlighting}/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 67 source ${pkgs.zsh-system-clipboard}/share/zsh/zsh-system-clipboard/zsh-system-clipboard.zsh 68 ''; 69 }; 70 71 xdg.configFile = let 72 filteredDirs = builtins.filter (dir: dir != "systemd") configDirs; 73 in 74 lib.genAttrs filteredDirs (dir: { 75 source = link "${dotfiles}/.config/${dir}"; 76 recursive = true; 77 }); 78 79 } 80 81