feat : bug
This commit is contained in:
parent
23a6282e6d
commit
8586884e4a
7 changed files with 38 additions and 13 deletions
18
flake.nix
18
flake.nix
|
|
@ -2,13 +2,14 @@
|
|||
description = "My homelab config";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, agenix, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
lib = nixpkgs.lib;
|
||||
mkHost = hostName: nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit hostName; };
|
||||
|
|
@ -16,13 +17,18 @@
|
|||
./configuration.nix
|
||||
(./. + "/host/hard-${hostName}.nix")
|
||||
agenix.nixosModules.default
|
||||
{ networking.hostName = hostName; }
|
||||
{
|
||||
networking.hostName = hostName;
|
||||
environment.systemPackages = [ agenix.packages.${system}.default ];
|
||||
}
|
||||
];
|
||||
};
|
||||
hosts = [
|
||||
"ThinkCentre-Server-004"
|
||||
"VPS-Server-005"
|
||||
];
|
||||
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
"ThinkCentre-Server-004" = mkHost "ThinkCentre-Server-004";
|
||||
"VPS-Server-005" = mkHost "VPS-Server-005";
|
||||
};
|
||||
nixosConfigurations = lib.genAttrs hosts mkHost;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue