feat : Refractor my host specific to be more generic

This commit is contained in:
Wateir 2025-12-23 16:47:50 +01:00
parent 0d29fd5686
commit 23a6282e6d
10 changed files with 196 additions and 163 deletions

View file

@ -9,16 +9,20 @@
outputs = { self, nixpkgs, agenix, ... }:
let
system = "x86_64-linux";
mkHost = hostName: nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit hostName; };
modules = [
./configuration.nix
(./. + "/host/hard-${hostName}.nix")
agenix.nixosModules.default
{ networking.hostName = hostName; }
];
};
in {
nixosConfigurations.ThinkCentre-Server-004 = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./configuration.nix
agenix.nixosModules.default
{
environment.systemPackages = [ agenix.packages.${system}.default ];
}
];
nixosConfigurations = {
"ThinkCentre-Server-004" = mkHost "ThinkCentre-Server-004";
"VPS-Server-005" = mkHost "VPS-Server-005";
};
};
};
}