all repos — nixfiles @ da04b1c6dd13af0dbada0d77ff195ab5e99eed5e

System and user configuration, managed by nix and home-manager

system/nix: set OS-agnostic nix options in common module

Alan Pearce
commit

da04b1c6dd13af0dbada0d77ff195ab5e99eed5e

parent

249f11ad9819d992a8fed1caa1432e9e8036b7d2

1 file changed, 6 insertions(+), 25 deletions(-)

changed files
M system/settings/configuration/nix.nixsystem/settings/configuration/nix.nix
@@ -8,36 +8,17 @@ ../../../pin.nix
]; nix = { settings = { - cores = 0; - auto-optimise-store = true; + cores = lib.mkDefault 0; use-xdg-base-directories = true; + keep-outputs = true; + keep-derivations = true; + experimental-features = "nix-command flakes"; + warn-dirty = false; }; - daemonCPUSchedPolicy = "idle"; - daemonIOSchedClass = "idle"; - - extraOptions = '' - keep-outputs = true - keep-derivations = true - experimental-features = nix-command flakes - warn-dirty = false - ''; - gc = { automatic = lib.mkDefault true; - options = "--delete-older-than 14d"; + options = lib.mkDefault "--delete-older-than 14d"; }; - }; - - system.autoUpgrade = { - enable = true; - flags = [ "--max-jobs" "2" ]; - flake = "/home/alan/projects/alanpearce/nixfiles"; - }; - systemd.services.nixos-upgrade = { - script = pkgs.lib.mkForce '' - ${pkgs.nix}/bin/nix-channel --update - ${config.system.build.nixos-rebuild}/bin/nixos-rebuild boot --no-build-output ${toString config.system.autoUpgrade.flags} - ''; }; }