2023-06-24 19:11:49 +02:00
{ config , pkgs , lib , inputs , . . . }:
{
2024-02-11 02:08:03 +01:00
2023-06-24 19:11:49 +02:00
system . autoUpgrade . enable = true ;
#system.autoUpgrade.allowReboot = true; # reboot after a kernel (module) or initrd upgrade, consider also setting `rebootWindow`
# TODO: make /etc/nixos a symlink to the in-store flake? - bad idea, horrible error recovery
2024-02-11 05:00:48 +01:00
# TODO: make /etc/nixos a writeable checkout of repo?
environment . etc . " c u r r e n t - s y s t e m - f l a k e " . source = inputs . self ; # the plan was to allow me to locate the new flake.lock, but alas https://github.com/NixOS/nix/issues/6895
2023-06-24 19:11:49 +02:00
system . autoUpgrade . flake = inputs . self . outPath ; # a nix store path
#system.autoUpgrade.flake = "github:pbsds/nix-config"; # TODO: use this instead?
2024-02-11 05:00:48 +01:00
2023-06-24 19:11:49 +02:00
system . autoUpgrade . flags = [
" - - r e c r e a t e - l o c k - f i l e " # fetch new inputs
" - - n o - w r i t e - l o c k - f i l e " # no write new flakelock, as the in-store flake is read-only
" - L " # print build logs
] ;
}