This commit is contained in:
parent
a0575bdb2a
commit
703bf836de
210 changed files with 1 additions and 1 deletions
55
modules/nixos-configurations.nix
Normal file
55
modules/nixos-configurations.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
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}" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue