nix-config/modules2/nixos-configurations.nix
Oliver Davies 0259ea44f0
All checks were successful
/ check (push) Successful in 1m43s
nix fmt
2025-07-24 21:13:55 +01:00

67 lines
1.4 KiB
Nix

{
config,
inputs,
self,
...
}:
{
flake =
let
inherit (self) outputs;
specialArgs = {
inherit inputs outputs self;
system = "x86_64-linux";
username = "opdavies";
};
mkNixosConfiguration =
{
hostname,
modules ? [ ],
stateVersion ? "22.11",
system ? "x86_64-linux",
}:
inputs.nixpkgs.lib.nixosSystem {
inherit system;
modules = modules ++ [
"${self}/hosts/${hostname}/configuration.nix"
];
specialArgs = specialArgs // {
inherit hostname stateVersion system;
};
};
in
{
nixosConfigurations = {
lemp11 = mkNixosConfiguration rec {
hostname = "lemp11";
modules = [ config.flake.modules.nixos."hosts/${hostname}" ];
};
nixedo = mkNixosConfiguration {
hostname = "nixedo";
stateVersion = "24.11";
};
t480 = mkNixosConfiguration rec {
hostname = "t480";
modules = [ config.flake.modules.nixos."hosts/${hostname}" ];
};
t490 = mkNixosConfiguration rec {
hostname = "t490";
modules = [ config.flake.modules.nixos."hosts/${hostname}" ];
};
PW05CH3L = mkNixosConfiguration { hostname = "PW05CH3L"; };
};
};
}