nix-config/modules2/nixos-configurations.nix
Oliver Davies 451a624b76 hosts: add PW05CH3L
Add a NixOS module for the PW05CH3L host, and start to separate `pc` and
`workstation` as a lot of `flake.modules.nixos.pc` isn't needed in WSL.

This probably won't be the final implementation, but it works for now.
2025-07-28 19:38:17 +01:00

70 lines
1.5 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 rec {
hostname = "PW05CH3L";
modules = [ config.flake.modules.nixos."hosts/${hostname}" ];
};
};
};
}