Move mkHost helper into a separate module
This commit is contained in:
25
flake.nix
25
flake.nix
@@ -6,33 +6,22 @@
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable } @inputs:
|
||||
outputs = { nixpkgs, ... }@inputs:
|
||||
let
|
||||
mkHost = { hostname, system, stateVersion }: nixpkgs.lib.nixosSystem {
|
||||
system = system;
|
||||
modules = [
|
||||
{
|
||||
networking = {
|
||||
hostName = hostname;
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
system.stateVersion = stateVersion;
|
||||
}
|
||||
./modules/nixos
|
||||
./hosts/${hostname}
|
||||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
utils = import ./lib { inherit inputs; };
|
||||
inherit (utils) mkHost;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
marauder = mkHost {
|
||||
hostname = "marauder";
|
||||
hostName = "marauder";
|
||||
system = "x86_64-linux";
|
||||
timeZone = "America/Los_Angeles";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
monolith = mkHost {
|
||||
hostname = "monolith";
|
||||
hostName = "monolith";
|
||||
system = "x86_64-linux";
|
||||
timeZone = "America/Los_Angeles";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user