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-07-31 01:49:16 +02:00
#system.autoUpgrade.flake = "git+https://gitea.noximilien.pbsds.net/pbsds/config.git";
system . autoUpgrade . flake = " g i t + h t t p s : / / g i t . p v v . n t n u . n o / p e d e r b 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-09-14 00:30:14 +02:00
" - - o p t i o n " " a c c e s s - t o k e n s " " " # don't risk an expired github token blocking the upgrade
2024-06-06 21:31:22 +02:00
# fetch new inputs
#"--recreate-lock-file" # update all
2024-09-13 23:02:32 +02:00
#"--override-input" "nixpkgs-edge" # deprecated in nix 2.22, removed in lix 2.90
" - - r e f r e s h "
" - - o v e r r i d e - i n p u t " " n i x p k g s - e d g e " " g i t h u b : N i x O S / n i x p k g s / n i x o s - u n s t a b l e "
" - - o v e r r i d e - i n p u t " " n i x p k g s - 2 4 0 5 " " g i t h u b : N i x O S / n i x p k g s / n i x o s - 2 4 . 0 5 "
" - - o v e r r i d e - i n p u t " " n i x p k g s - 2 3 1 1 " " g i t h u b : N i x O S / n i x p k g s / n i x o s - 2 3 . 1 1 "
" - - o v e r r i d e - i n p u t " " h o m e - m a n a g e r - e d g e " " g i t h u b : n i x - c o m m u n i t y / h o m e - m a n a g e r / m a s t e r "
" - - o v e r r i d e - i n p u t " " h o m e - m a n a g e r - 2 4 0 5 " " g i t h u b : n i x - c o m m u n i t y / h o m e - m a n a g e r / r e l e a s e - 2 4 . 0 5 "
" - - o v e r r i d e - i n p u t " " h o m e - m a n a g e r - 2 3 1 1 " " g i t h u b : n i x - c o m m u n i t y / h o m e - m a n a g e r / r e l e a s e - 2 3 . 1 1 "
" - - o v e r r i d e - i n p u t " " n i x - i n d e x - d a t a b a s e " " g i t h u b : M i c 9 2 / n i x - i n d e x - d a t a b a s e "
" - - o v e r r i d e - i n p u t " " n i x o s - h a r d w a r e " " g i t h u b : N i x O S / n i x o s - h a r d w a r e "
2023-06-24 19:11:49 +02:00
] ;
2024-07-08 22:30:11 +02:00
# lots of "empty" updates
boot . loader . grub . configurationLimit = 15 ;
boot . loader . systemd-boot . configurationLimit = 15 ;
boot . loader . raspberryPi . uboot . configurationLimit = 15 ;
boot . loader . generic-extlinux-compatible . configurationLimit = 15 ;
2023-06-24 19:11:49 +02:00
}