2023-06-24 19:11:49 +02:00
{ config , pkgs , lib , inputs , . . . }:
2024-06-06 21:31:22 +02:00
# TODO: make /etc/nixos a symlink to the in-store flake? - bad idea, horrible error recovery
# TODO: make /etc/nixos a writeable checkout of repo?
2023-06-24 19:11:49 +02:00
{
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`
2024-02-11 05:00:48 +01:00
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
2024-06-06 21:31:22 +02:00
#system.autoUpgrade.flake = inputs.self.outPath; # a nix store path
2023-06-24 19:11:49 +02:00
#system.autoUpgrade.flake = "github:pbsds/nix-config"; # TODO: use this instead?
2024-06-06 21:31:22 +02:00
system . autoUpgrade . flake = " g i t + h t t p s : / / g i t e a . n o x i m i l i e n . p b s d s . n e t / p b s d s / c o n f i g . g i t " ;
2024-02-11 05:00:48 +01:00
2023-06-24 19:11:49 +02:00
system . autoUpgrade . flags = [
2024-06-06 21:31:22 +02:00
" - L " # print build logs
2023-06-24 19:11:49 +02:00
" - - 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
2024-06-06 21:31:22 +02:00
# fetch new inputs
#"--recreate-lock-file" # update all
" - - u p d a t e - i n p u t " " n i x p k g s - e d g e " " - - u p d a t e - i n p u t " " h o m e - m a n a g e r - e d g e "
" - - u p d a t e - i n p u t " " n i x p k g s - 2 4 0 5 " " - - u p d a t e - i n p u t " " h o m e - m a n a g e r - 2 4 0 5 "
" - - u p d a t e - i n p u t " " n i x p k g s - 2 3 1 1 " " - - u p d a t e - i n p u t " " h o m e - m a n a g e r - 2 3 1 1 "
" - - u p d a t e - i n p u t " " n i x - i n d e x - d a t a b a s e "
" - - u p d a t e - i n p u t " " n i x o s - h a r d w a r e "
2023-06-24 19:11:49 +02:00
] ;
}