NixServerConfig/flake.nix

28 lines
735 B
Nix

{
description = "My homelab config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
agenix.url = "github:ryantm/agenix";
};
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" = mkHost "ThinkCentre-Server-004";
"VPS-Server-005" = mkHost "VPS-Server-005";
};
};
}