Enable autoUpgrade by default, disable for laptops

Normal operation is "boot", use "switch" for server.
This commit is contained in:
Evie Litherland-Smith 2025-02-25 14:11:22 +00:00
parent f30b532cc1
commit 8c1a1631f5
3 changed files with 23 additions and 10 deletions

View file

@ -21,16 +21,13 @@
system = {
stateVersion = "23.05";
autoUpgrade = {
enable = true;
persistent = true;
allowReboot = false;
flake = "git+https://git.xenia.me.uk/pixelifytica/nixos.git?ref=main";
dates = "02:00";
flags = [
"--option"
"extra-binary-caches"
"https://nix.xenia.me.uk"
];
operation = "switch";
randomizedDelaySec = "0";
allowReboot = true;
rebootWindow = {
lower = "01:00";
upper = "05:00";
};
};
};
users.mutableUsers = false;

View file

@ -49,6 +49,21 @@
"steamcmd"
"nomachine-client"
];
system.autoUpgrade = {
enable = lib.mkDefault true;
persistent = true;
allowReboot = false;
flake = "git+https://git.xenia.me.uk/pixelifytica/nixos.git?ref=main";
operation = lib.mkDefault "boot";
dates = "daily";
randomizedDelaySec = lib.mkDefault "45min";
fixedRandomDelay = true;
flags = [
"--option"
"extra-binary-caches"
"https://nix.xenia.me.uk"
];
};
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;

View file

@ -4,6 +4,7 @@
}:
{
imports = [ ./desktop.nix ];
system.autoUpgrade.enable = false;
environment.systemPackages = [ pkgs.acpi ];
powerManagement.enable = true;
networking.networkmanager.wifi.powersave = true;