Move mkHost helper into a separate module
This commit is contained in:
parent
f7872964ec
commit
9bf329b9d1
6 changed files with 35 additions and 61 deletions
18
lib/default.nix
Normal file
18
lib/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ inputs }: {
|
||||
mkHost = { hostName, system, timeZone, stateVersion }: inputs.nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
{
|
||||
networking.hostName = hostName;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
system.stateVersion = stateVersion;
|
||||
time.timeZone = timeZone;
|
||||
}
|
||||
../modules/nixos
|
||||
../hosts/${hostName}
|
||||
];
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue