Compare commits

..

2 commits

Author SHA1 Message Date
Dmitry Voronin c8882354e2 AutoUpdate : Boot instead of a switch. 2024-03-03 23:45:56 +03:00
Dmitry Voronin 0b7f258ce7 System : Enable auto-update. 2024-03-03 23:44:53 +03:00
2 changed files with 6 additions and 4 deletions

View file

@ -10,6 +10,7 @@
];
script = ''
${config.system.build.nixos-rebuild}/bin/nixos-rebuild boot --flake "/root/.config/linux/system#$HOSTNAME"
${config.nix.package.out}/bin/nix-collect-garbage --delete-older-than 7d
'';
};
systemd.timers.autoupdate = {

View file

@ -1,9 +1,10 @@
{ environment, ... }: {
environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
nix.extraOptions = "experimental-features = nix-command flakes";
nix.gc.automatic = false;
nix.gc.dates = "daily";
nix.gc.options = "--delete-older-than 7d";
nix.extraOptions = ''
experimental-features = nix-command flakes
keep-derivations = true
keep-outputs = true
'';
nix.settings.auto-optimise-store = true;
nixpkgs.config.allowUnfree = true;
}