Move mkHost helper into a separate module

This commit is contained in:
Nettika 2024-07-11 19:18:29 -07:00
parent f7872964ec
commit 9bf329b9d1
6 changed files with 35 additions and 61 deletions

18
lib/default.nix Normal file
View 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;
};
};
}