feat : Refractor my host specific to be more generic
This commit is contained in:
parent
0d29fd5686
commit
23a6282e6d
10 changed files with 196 additions and 163 deletions
24
flake.nix
24
flake.nix
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue