NixToSee/hostHelper.nix
2025-05-04 18:12:17 +02:00

14 lines
350 B
Nix

inArgs: hostname: hostOptions:
let
nixosSystem =
if (hostOptions ? unstable && hostOptions.unstable)
then inArgs.nixos-unstable.lib.nixosSystem
else inArgs.nixpkgs.lib.nixosSystem;
in
nixosSystem {
specialArgs = {inherit inArgs;};
modules = [
{networking.hostName = hostname;}
(./hosts/${hostname})
];
}