nix-config/modules2/nixos-configurations.nix

71 lines
1.5 KiB
Nix
Raw Normal View History

2025-07-24 21:13:55 +01:00
{
config,
inputs,
self,
...
}:
2025-07-09 02:12:31 +01:00
{
flake =
let
inherit (self) outputs;
specialArgs = {
inherit inputs outputs self;
system = "x86_64-linux";
username = "opdavies";
};
mkNixosConfiguration =
{
hostname,
2025-07-24 21:13:55 +01:00
modules ? [ ],
2025-07-09 02:12:31 +01:00
stateVersion ? "22.11",
system ? "x86_64-linux",
}:
inputs.nixpkgs.lib.nixosSystem {
inherit system;
2025-07-23 19:26:21 +01:00
modules = modules ++ [
2025-07-23 19:26:21 +01:00
"${self}/hosts/${hostname}/configuration.nix"
];
2025-07-09 02:12:31 +01:00
specialArgs = specialArgs // {
inherit hostname stateVersion system;
};
};
in
{
nixosConfigurations = {
2025-07-23 19:26:21 +01:00
lemp11 = mkNixosConfiguration rec {
hostname = "lemp11";
modules = [ config.flake.modules.nixos."hosts/${hostname}" ];
};
2025-07-09 02:12:31 +01:00
nixedo = mkNixosConfiguration {
hostname = "nixedo";
stateVersion = "24.11";
};
2025-07-23 19:26:21 +01:00
t480 = mkNixosConfiguration rec {
hostname = "t480";
2025-07-09 02:12:31 +01:00
2025-07-23 19:26:21 +01:00
modules = [ config.flake.modules.nixos."hosts/${hostname}" ];
};
t490 = mkNixosConfiguration rec {
hostname = "t490";
modules = [ config.flake.modules.nixos."hosts/${hostname}" ];
};
2025-07-09 02:12:31 +01:00
PW05CH3L = mkNixosConfiguration rec {
hostname = "PW05CH3L";
modules = [ config.flake.modules.nixos."hosts/${hostname}" ];
};
2025-07-09 02:12:31 +01:00
};
};
}