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;
system = {
inherit stateVersion;
autoUpgrade.flake = flakeURL;
autoUpgrade = {
enable = true;
dates = "02:00";
allowReboot = false;
flake = flakeURL;
};
};
users.users.${user} = {
inherit group;

View file

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