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" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];

View File

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

View File

@@ -19,4 +19,7 @@
}; };
displayManager.defaultSession = "cinnamon"; 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;
};
};
}