nix-config/modules/nixos-configurations.nix
Oliver Davies 703bf836de
All checks were successful
/ check (push) Successful in 55s
Rename modules directory
2025-08-18 11:35:07 +01:00

55 lines
1.1 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 = {
nixedo = mkNixosConfiguration rec {
hostname = "nixedo";
stateVersion = "24.11";
modules = [ config.flake.modules.nixos."nixosConfigurations/${hostname}" ];
};
t480 = mkNixosConfiguration rec {
hostname = "t480";
modules = [ config.flake.modules.nixos."nixosConfigurations/${hostname}" ];
};
};
};
}