blob: e11b038930202abd7c9c773ceda30491cec15c84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
{ config
, lib
, pkgs
, ...
}: {
imports = [
./nix.nix
];
nix = {
settings = {
auto-optimise-store = true;
};
daemonCPUSchedPolicy = "idle";
daemonIOSchedClass = "idle";
};
nixpkgs.config.allowUnfree = true;
system.autoUpgrade = {
enable = true;
flags = [ "--max-jobs" "2" ];
};
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}
'';
};
}
|