From 0a50d682ec85bf023bebd68a3ca388001f0c0677 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 8 Oct 2019 21:44:57 +0200 Subject: mv modules settings --- system/settings/configuration/nix.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 system/settings/configuration/nix.nix (limited to 'system/settings/configuration/nix.nix') diff --git a/system/settings/configuration/nix.nix b/system/settings/configuration/nix.nix new file mode 100644 index 00000000..d254de0e --- /dev/null +++ b/system/settings/configuration/nix.nix @@ -0,0 +1,29 @@ +{ config, pkgs, ... }: + +{ nix = { + buildCores = 0; + + daemonNiceLevel = 19; + daemonIONiceLevel = 7; + + autoOptimiseStore = true; + gc = { + automatic = true; + options = "--delete-older-than 14d"; + }; + }; + + environment.systemPackages = with pkgs; [ + cachix + ]; + + system.autoUpgrade = { + enable = true; + flags = [ "--max-jobs" "1" ]; + }; + systemd.services.nixos-upgrade = { + script = pkgs.lib.mkForce '' + ${config.system.build.nixos-rebuild}/bin/nixos-rebuild boot --no-build-output --upgrade ${toString config.system.autoUpgrade.flags} + ''; + }; +} -- cgit 1.4.1