config/profiles/auto-upgrade.nix

36 lines
1.5 KiB
Nix
Raw Normal View History

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."current-system-flake".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 = "git+https://gitea.noximilien.pbsds.net/pbsds/config.git";
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
"--no-write-lock-file" # 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
"--update-input" "nixpkgs-edge" "--update-input" "home-manager-edge"
"--update-input" "nixpkgs-2405" "--update-input" "home-manager-2405"
"--update-input" "nixpkgs-2311" "--update-input" "home-manager-2311"
"--update-input" "nix-index-database"
"--update-input" "nixos-hardware"
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
}