diff --git a/flake.nix b/flake.nix index b1cf4e80..67c0cf7b 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,7 @@ group = "users"; shell = "zsh"; systemModules = [ ./system/hyprland.nix ]; + serviceModules = [ ]; homeModules = [ ./home/default.nix ./home/emacs.nix @@ -33,7 +34,8 @@ }; systemConfig = { hostName ? default.hostName, user ? default.user , system ? default.system, group ? default.group, shell ? default.shell - , systemModules ? default.systemModules, serviceModules ? [ ] + , systemModules ? default.systemModules + , serviceModules ? default.serviceModules , homeModules ? default.homeModules, stateVersion ? default.stateVersion }: let specialArgs = { inherit hostName user; }; @@ -209,13 +211,15 @@ in { nixosConfigurations = { + ## Server + Legion = let hostName = "Legion"; user = "xenia"; system = "x86_64-linux"; in systemConfig { inherit hostName user system; - systemModules = [ ./system/default.nix ]; + systemModules = [ ./system/default.nix ./system/autoupgrade.nix ]; serviceModules = [ ./services/adguardhome.nix ./services/caddy.nix @@ -229,6 +233,8 @@ homeModules = [ ./home/default.nix ]; }; + ## Laptops + Northstar = let hostName = "Northstar"; user = "xenia"; @@ -241,11 +247,16 @@ system = "x86_64-linux"; in systemConfig { inherit hostName user system; }; + ## Desktops + Scorch = let hostName = "Scorch"; user = "elitherl"; system = "x86_64-linux"; - in systemConfig { inherit hostName user system; }; + in systemConfig { + inherit hostName user system; + systemModules = default.systemModules ++ [ ./system/autoupgrade.nix ]; + }; Vanguard = let hostName = "Vanguard"; @@ -253,7 +264,8 @@ system = "x86_64-linux"; in systemConfig { inherit hostName user system; - systemModules = default.systemModules ++ [ ./system/steam.nix ]; + systemModules = default.systemModules + ++ [ ./system/autoupgrade.nix ./system/steam.nix ]; homeModules = default.homeModules ++ [ ./home/games/default.nix ]; }; diff --git a/hosts/Legion/configuration.nix b/hosts/Legion/configuration.nix index 0eaaf012..f70f6455 100644 --- a/hosts/Legion/configuration.nix +++ b/hosts/Legion/configuration.nix @@ -1,11 +1,9 @@ # 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, ... }: { +{ ... }: { users.mutableUsers = false; system.autoUpgrade = { - enable = true; - flake = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main"; dates = "02:30"; allowReboot = true; rebootWindow = { diff --git a/hosts/Ronin/configuration.nix b/hosts/Ronin/configuration.nix index a265850e..5fb9b4c6 100644 --- a/hosts/Ronin/configuration.nix +++ b/hosts/Ronin/configuration.nix @@ -14,4 +14,6 @@ ''; systemPackages = with pkgs; [ openfortivpn samba nomachine-client ]; }; + + system.autoUpgrade.allowReboot = false; } diff --git a/hosts/Vanguard/configuration.nix b/hosts/Vanguard/configuration.nix index c915eb0a..8e749cbc 100644 --- a/hosts/Vanguard/configuration.nix +++ b/hosts/Vanguard/configuration.nix @@ -1 +1 @@ -{ ... }: { } +{ ... }: { system.autoUpgrade.allowReboot = false; } diff --git a/system/autoupgrade.nix b/system/autoupgrade.nix new file mode 100644 index 00000000..143ce826 --- /dev/null +++ b/system/autoupgrade.nix @@ -0,0 +1,6 @@ +{ ... }: { + system.autoUpgrade = { + enable = true; + flake = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main"; + }; +}