Enable autoUpgrade by default but without reboot

This commit is contained in:
Evie Litherland-Smith 2023-09-24 12:09:08 +01:00
parent 360bebb829
commit f90f22f09f
2 changed files with 8 additions and 5 deletions

View file

@ -166,7 +166,12 @@
programs.${shell}.enable = true; programs.${shell}.enable = true;
system = { system = {
inherit stateVersion; inherit stateVersion;
autoUpgrade.flake = flakeURL; autoUpgrade = {
enable = true;
dates = "02:00";
allowReboot = false;
flake = flakeURL;
};
}; };
users.users.${user} = { users.users.${user} = {
inherit group; inherit group;

View file

@ -1,7 +1,7 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`). # and in the NixOS manual (accessible by running `nixos-help`).
{ ... }: { lib, ... }:
let let
# generate via openvpn --genkey --secret openvpn-laptop.key # generate via openvpn --genkey --secret openvpn-laptop.key
client-key = "/root/openvpn.key"; client-key = "/root/openvpn.key";
@ -14,9 +14,7 @@ in {
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
users.mutableUsers = false; users.mutableUsers = false;
system.autoUpgrade = { system.autoUpgrade = {
enable = true; allowReboot = lib.mkForce true;
dates = "02:00";
allowReboot = true;
rebootWindow = { rebootWindow = {
lower = "03:00"; lower = "03:00";
upper = "05:00"; upper = "05:00";