From df5834fcaf7c6eb35b809b058fd9227990bbc4ff Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 23 Jul 2025 19:26:21 +0100 Subject: [PATCH] Add `lemp11` and `t490` hosts --- modules2/hosts/lemp11/imports.nix | 7 +++++++ modules2/hosts/t490/imports.nix | 7 +++++++ modules2/nixos-configurations.nix | 23 +++++++++++++++++------ 3 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 modules2/hosts/lemp11/imports.nix create mode 100644 modules2/hosts/t490/imports.nix diff --git a/modules2/hosts/lemp11/imports.nix b/modules2/hosts/lemp11/imports.nix new file mode 100644 index 00000000..3b832d67 --- /dev/null +++ b/modules2/hosts/lemp11/imports.nix @@ -0,0 +1,7 @@ +{ config, ... }: + +{ + flake.modules.nixos."hosts/lemp11".imports = with config.flake.modules.nixos; [ + pc + ]; +} diff --git a/modules2/hosts/t490/imports.nix b/modules2/hosts/t490/imports.nix new file mode 100644 index 00000000..80ce1936 --- /dev/null +++ b/modules2/hosts/t490/imports.nix @@ -0,0 +1,7 @@ +{ config, ... }: + +{ + flake.modules.nixos."hosts/t490".imports = with config.flake.modules.nixos; [ + pc + ]; +} diff --git a/modules2/nixos-configurations.nix b/modules2/nixos-configurations.nix index b378e027..70802d0a 100644 --- a/modules2/nixos-configurations.nix +++ b/modules2/nixos-configurations.nix @@ -15,16 +15,15 @@ mkNixosConfiguration = { hostname, + modules ? [], stateVersion ? "22.11", system ? "x86_64-linux", }: inputs.nixpkgs.lib.nixosSystem { inherit system; - modules = [ + modules = modules ++ [ "${self}/hosts/${hostname}/configuration.nix" - - config.flake.modules.nixos."hosts/${hostname}" ]; specialArgs = specialArgs // { @@ -34,16 +33,28 @@ in { nixosConfigurations = { - lemp11 = mkNixosConfiguration { hostname = "lemp11"; }; + lemp11 = mkNixosConfiguration rec { + hostname = "lemp11"; + + modules = [ config.flake.modules.nixos."hosts/${hostname}" ]; + }; nixedo = mkNixosConfiguration { hostname = "nixedo"; stateVersion = "24.11"; }; - t480 = mkNixosConfiguration { hostname = "t480"; }; + t480 = mkNixosConfiguration rec { + hostname = "t480"; - t490 = mkNixosConfiguration { hostname = "t490"; }; + modules = [ config.flake.modules.nixos."hosts/${hostname}" ]; + }; + + t490 = mkNixosConfiguration rec { + hostname = "t490"; + + modules = [ config.flake.modules.nixos."hosts/${hostname}" ]; + }; PW05CH3L = mkNixosConfiguration { hostname = "PW05CH3L"; }; };