my over complex system configurations dotfiles.isabelroses.com/
nixos nix flake dotfiles linux

base/nix: cleanup + improve eval speed

+5 -40
+3 -39
modules/base/nix/environment.nix
··· 1 - { 2 - lib, 3 - pkgs, 4 - config, 5 - ... 6 - }: 7 - let 8 - inherit (lib) 9 - elem 10 - pipe 11 - optionals 12 - filterAttrs 13 - mapAttrs' 14 - mkForce 15 - ; 16 - 17 - commonPaths = [ 18 - "nixpkgs" 19 - "tgirlpkgs" 20 - ] 21 - ++ optionals pkgs.stdenv.hostPlatform.isDarwin [ 22 - "nix-darwin" 23 - ]; 24 - in 1 + { lib, ... }: 25 2 { 26 - environment = { 27 - # https://github.com/NixOS/nixpkgs/blob/eca4605163a534aed1981de0f5f1d7d7639d1640/nixos/modules/programs/environment.nix#L18 28 - variables.NIXPKGS_CONFIG = mkForce ""; 29 - 30 - # something something backwards compatibility something something nix channels 31 - etc = pipe config.nix.registry [ 32 - (filterAttrs (name: _: elem name commonPaths)) 33 - (mapAttrs' ( 34 - name: value: { 35 - name = "nix/path/${name}"; 36 - value.source = value.flake; 37 - } 38 - )) 39 - ]; 40 - }; 3 + # https://github.com/NixOS/nixpkgs/blob/eca4605163a534aed1981de0f5f1d7d7639d1640/nixos/modules/programs/environment.nix#L18 4 + environment.variables.NIXPKGS_CONFIG = lib.mkForce ""; 41 5 }
+2 -1
modules/base/nix/substituters.nix
··· 2 2 lib, 3 3 config, 4 4 _class, 5 + options, 5 6 ... 6 7 }: 7 8 let 8 9 inherit (lib) optionals; 9 10 10 11 # well well well 11 - hasCtp = if _class == "darwin" then true else (config ? catppuccin && config.catppuccin.enable); 12 + hasCtp = if _class == "darwin" then true else (options ? catppuccin && config.catppuccin.enable); 12 13 in 13 14 { 14 15 tgirlpkgs.cache.enable = true;