Remove mkHost helper

This commit is contained in:
2024-07-11 19:42:29 -07:00
parent 01f87a620d
commit 13cb1c6223
5 changed files with 31 additions and 33 deletions

View File

@@ -1,6 +1,9 @@
{ options, config, lib, ... }:
{ hostName, ... }:
{
networking.networkmanager.enable = true;
networking = {
inherit hostName;
networkmanager.enable = true;
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];

View File

@@ -6,23 +6,29 @@
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { nixpkgs, ... }@inputs:
let
utils = import ./lib { inherit inputs; };
inherit (utils) mkHost;
in {
outputs = { nixpkgs, ... }@inputs: {
nixosConfigurations = {
marauder = mkHost {
hostName = "marauder";
marauder = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
timeZone = "America/Los_Angeles";
stateVersion = "24.05";
modules = [
./hosts/marauder
./common.nix
];
specialArgs = {
hostName = "marauder";
inherit inputs;
};
};
monolith = mkHost {
hostName = "monolith";
monolith = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
timeZone = "America/Los_Angeles";
stateVersion = "24.05";
modules = [
./hosts/monolith
./common.nix
];
specialArgs = {
hostName = "monolith";
inherit inputs;
};
};
};
};

View File

@@ -19,4 +19,7 @@
};
displayManager.defaultSession = "cinnamon";
};
time.timeZone = "America/Los_Angeles";
system.stateVersion = "24.05";
}

View File

@@ -1 +1,4 @@
{ ... }: {}
{ ... }: {
time.timeZone = "America/Los_Angeles";
system.stateVersion = "24.05";
}

View File

@@ -1,17 +0,0 @@
{ inputs }: {
mkHost = { hostName, system, timeZone, stateVersion }: inputs.nixpkgs.lib.nixosSystem {
inherit system;
modules = [
{
networking.hostName = hostName;
system.stateVersion = stateVersion;
time.timeZone = timeZone;
}
../modules/nixos
../hosts/${hostName}
];
specialArgs = {
inherit inputs;
};
};
}