From 51cc4d9486edac3a502925348ab3de0c0005be99 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 7 Jun 2024 06:17:37 +0100 Subject: [PATCH] Try re-enabling system.autoUpgrade with the "boot" operation --- configuration/Legion.nix | 8 +++----- configuration/default.nix | 17 ++++++++++++++++- configuration/desktop.nix | 1 + 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/configuration/Legion.nix b/configuration/Legion.nix index 087b57bd..6e2aa886 100644 --- a/configuration/Legion.nix +++ b/configuration/Legion.nix @@ -1,4 +1,4 @@ -{config, ...}: { +{...}: { imports = [ ../services/caddy.nix ../services/forgejo.nix @@ -16,12 +16,10 @@ }; users.mutableUsers = false; system.autoUpgrade = { - enable = true; - flake = "git+${config.nix.registry.my-nixos.to.url}"; - dates = "02:00"; + operation = "switch"; allowReboot = true; rebootWindow = { - lower = "02:00"; + lower = "01:00"; upper = "05:00"; }; }; diff --git a/configuration/default.nix b/configuration/default.nix index 38a98fbc..a425f3da 100644 --- a/configuration/default.nix +++ b/configuration/default.nix @@ -1,4 +1,5 @@ { + config, pkgs, iosevkaCustom, ... @@ -26,7 +27,21 @@ ''; }; nixpkgs.config.allowUnfree = true; - system.stateVersion = "23.05"; + system = { + stateVersion = "23.05"; + autoUpgrade = { + enable = true; + persistent = true; + flake = "git+${config.nix.registry.my-nixos.to.url}"; + dates = "02:00"; + randomizedDelaySec = "45min"; + flags = [ + "--option" + "extra-binary-caches" + "https://nix.xenia.me.uk" + ]; + }; + }; boot.loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; diff --git a/configuration/desktop.nix b/configuration/desktop.nix index d80b39cf..ee94adec 100644 --- a/configuration/desktop.nix +++ b/configuration/desktop.nix @@ -5,6 +5,7 @@ }: { imports = [./default.nix]; nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland"; + system.autoUpgrade.operation = "boot"; environment = { sessionVariables = { NIXOS_OZONE_WL = "1";