Personal Nix flake
nixos home-manager nix
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: Improve shared nix options

+36 -36
-1
nix/home/modules/development/nixd.nix
··· 1 1 { 2 - inputs, 3 2 config, 4 3 lib, 5 4 osConfig ? {},
+2 -12
nix/home/modules/nix/default.nix
··· 3 3 inputs, 4 4 lib, 5 5 osConfig ? {}, 6 - pkgs, 7 6 ... 8 7 }: let 9 8 inherit (config.my.config) nix; ··· 18 17 }; 19 18 20 19 nix = { 21 - inherit (nix) settings; 22 20 extraOptions = '' 23 21 !include ${config.my.secrets."nix-extra-access-tokens".path} 24 22 ''; 25 - gc = { 26 - automatic = osConfig == {}; 27 - dates = "daily"; 28 - options = "--delete-older-than 7d"; 29 - }; 30 - package = lib.mkForce (osConfig.nix.package or pkgs.lixPackageSets.stable.lix); 23 + gc.automatic = osConfig == {}; 31 24 }; 32 25 33 - nixpkgs = lib.mkIf (osConfig == {}) { 34 - inherit (nix.pkgs) config; 35 - overlays = builtins.attrValues inputs.self.overlays; 36 - }; 26 + nixpkgs = lib.mkIf (osConfig == {}) nix.pkgs; 37 27 }; 38 28 }
+11 -3
nix/lib/config.nix
··· 1 - {lib, ...}: let 1 + { 2 + inputs, 3 + lib, 4 + ... 5 + }: let 2 6 assets = ../../assets; 3 7 filter = prefix: (name: type: type == "regular" && lib.strings.hasPrefix prefix name); 4 8 assetWithPrefix = prefix: ··· 17 21 wallpaper = assetWithPrefix "wallpaper"; 18 22 profilePicture = assetWithPrefix "profile-picture"; 19 23 nix = { 20 - pkgs.config = { 21 - allowUnfree = true; 24 + pkgs = { 25 + config = { 26 + allowUnfree = true; 27 + }; 28 + overlays = builtins.attrValues inputs.self.overlays; 22 29 }; 23 30 settings = { 24 31 accept-flake-config = true; ··· 39 46 keep-derivations = true; 40 47 keep-outputs = true; 41 48 max-jobs = "auto"; 49 + trusted-users = ["root" "@wheel"]; 42 50 }; 43 51 }; 44 52 kb = rec {
+4 -14
nix/nixos/modules/nix/default.nix
··· 1 1 { 2 2 config, 3 - inputs, 4 3 lib, 5 - pkgs, 6 4 ... 7 5 }: let 8 6 inherit (config.my.config) nix; ··· 13 11 environment.sessionVariables = { 14 12 NIXPKGS_ALLOW_UNFREE = "1"; 15 13 }; 16 - nix.gc = { 17 - automatic = let 18 - nhCfg = config.programs.nh; 19 - in 20 - !nhCfg.enable || !nhCfg.clean.enable; 21 - dates = "weekly"; 22 - }; 23 - nix.package = pkgs.lixPackageSets.stable.lix; 24 - nixpkgs = { 25 - inherit (nix.pkgs) config; 26 - overlays = builtins.attrValues inputs.self.overlays; 27 - }; 14 + 15 + nix.gc.automatic = !config.programs.nh.enable || !config.programs.nh.clean.enable; 16 + 17 + nixpkgs = nix.pkgs; 28 18 }; 29 19 }
-1
nix/nixos/modules/users/default.nix
··· 25 25 mutableUsers = false; 26 26 extraUsers.root.hashedPassword = null; 27 27 }; 28 - nix.settings.trusted-users = ["root" "@wheel"]; 29 28 }; 30 29 }
+1 -5
nix/shared/default.nix
··· 4 4 ... 5 5 }: let 6 6 inherit (inputs) self; 7 - inherit (self.lib.config.nix) settings; 8 7 in { 9 8 imports = [ 9 + ./nix.nix 10 10 ./secrets.nix 11 11 ./theming.nix 12 12 ]; 13 13 14 14 options = { 15 15 my.config = lib.mkOption {default = self.lib.config;}; 16 - }; 17 - 18 - config = { 19 - nix = {inherit settings;}; 20 16 }; 21 17 }
+18
nix/shared/nix.nix
··· 1 + { 2 + inputs, 3 + lib, 4 + pkgs, 5 + ... 6 + }: let 7 + inherit (inputs.self.lib.config.nix) settings; 8 + in { 9 + nix = { 10 + inherit settings; 11 + gc = { 12 + automatic = lib.mkDefault true; 13 + dates = "daily"; 14 + options = "--delete-older-than 7d"; 15 + }; 16 + package = lib.mkForce pkgs.lixPackageSets.stable.lix; 17 + }; 18 + }