From f12a67b12d3df3c610fa833a42e5ba0e18611b09 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 6 Mar 2024 16:07:40 +0100 Subject: [PATCH] simplify autoUpgrade Signed-off-by: Harald Hoyer --- homes/x86_64-linux/harald@sgx/default.nix | 2 +- modules/nixos/services/base/default.nix | 12 ++++++++++++ systems/x86_64-linux/sgx-nixos/default.nix | 9 +-------- systems/x86_64-linux/sgx/default.nix | 9 +-------- systems/x86_64-linux/x1/default.nix | 9 +-------- 5 files changed, 16 insertions(+), 25 deletions(-) diff --git a/homes/x86_64-linux/harald@sgx/default.nix b/homes/x86_64-linux/harald@sgx/default.nix index 970aee4..68f018f 100644 --- a/homes/x86_64-linux/harald@sgx/default.nix +++ b/homes/x86_64-linux/harald@sgx/default.nix @@ -1,4 +1,4 @@ -{ config , ... }: +{ config, ... }: { home.sessionPath = [ "$HOME/bin" ]; diff --git a/modules/nixos/services/base/default.nix b/modules/nixos/services/base/default.nix index bfbf61f..ec26366 100644 --- a/modules/nixos/services/base/default.nix +++ b/modules/nixos/services/base/default.nix @@ -7,6 +7,7 @@ in { options.plusultra.base = with types; { enable = mkBoolOpt false "Whether or not to enable the base config."; + }; config = mkIf cfg.enable { @@ -114,5 +115,16 @@ in initrd.systemd.enable = true; kernelPackages = lib.mkOverride 0 pkgs.linuxPackages_latest; }; + + system.autoUpgrade = { + flags = [ + "--update-input" + "nixpkgs" + "--update-input" + "unstable" + ]; + flake = "git+https://git.hoyer.xyz/harald/nixcfg"; + }; + }; } diff --git a/systems/x86_64-linux/sgx-nixos/default.nix b/systems/x86_64-linux/sgx-nixos/default.nix index 58e5464..92e50df 100644 --- a/systems/x86_64-linux/sgx-nixos/default.nix +++ b/systems/x86_64-linux/sgx-nixos/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, config, host, ... }: +{ pkgs, lib, config, ... }: with lib; with lib.plusultra; { @@ -18,13 +18,6 @@ with lib.plusultra; enable = true; operation = "boot"; allowReboot = true; - flags = [ - "--update-input" - "nixpkgs" - "--update-input" - "unstable" - ]; - flake = "git+https://git.hoyer.xyz/harald/nixcfg#${host}"; }; networking.hostName = "sgx-nixos"; # Define your hostname. diff --git a/systems/x86_64-linux/sgx/default.nix b/systems/x86_64-linux/sgx/default.nix index 0f2b75a..8347e8f 100644 --- a/systems/x86_64-linux/sgx/default.nix +++ b/systems/x86_64-linux/sgx/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, config, host, ... }: +{ pkgs, lib, config, ... }: with lib; with lib.plusultra; { @@ -20,13 +20,6 @@ with lib.plusultra; enable = true; operation = "boot"; allowReboot = true; - flags = [ - "--update-input" - "nixpkgs" - "--update-input" - "unstable" - ]; - flake = "git+https://git.hoyer.xyz/harald/nixcfg#${host}"; }; networking.hostName = "sgx"; # Define your hostname. diff --git a/systems/x86_64-linux/x1/default.nix b/systems/x86_64-linux/x1/default.nix index 0ce80d4..4c2616c 100644 --- a/systems/x86_64-linux/x1/default.nix +++ b/systems/x86_64-linux/x1/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, host, ... }: +{ pkgs, lib, ... }: with lib; with lib.plusultra; { @@ -18,13 +18,6 @@ with lib.plusultra; enable = true; operation = "boot"; allowReboot = false; - flags = [ - "--update-input" - "nixpkgs" - "--update-input" - "unstable" - ]; - flake = "git+https://git.hoyer.xyz/harald/nixcfg#${host}"; }; system.stateVersion = "23.11";