nix-config/modules2/nixos-configurations.nix

52 lines
1.1 KiB
Nix
Raw Normal View History

2025-07-23 19:26:21 +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,
stateVersion ? "22.11",
system ? "x86_64-linux",
}:
inputs.nixpkgs.lib.nixosSystem {
inherit system;
2025-07-23 19:26:21 +01:00
modules = [
"${self}/hosts/${hostname}/configuration.nix"
config.flake.modules.nixos."hosts/${hostname}"
];
2025-07-09 02:12:31 +01:00
specialArgs = specialArgs // {
inherit hostname stateVersion system;
};
};
in
{
nixosConfigurations = {
lemp11 = mkNixosConfiguration { hostname = "lemp11"; };
nixedo = mkNixosConfiguration {
hostname = "nixedo";
stateVersion = "24.11";
};
t480 = mkNixosConfiguration { hostname = "t480"; };
t490 = mkNixosConfiguration { hostname = "t490"; };
PW05CH3L = mkNixosConfiguration { hostname = "PW05CH3L"; };
};
};
}