1
0

flake/nixosConfigurations.nix: Generate hostname from host attribute name

This commit is contained in:
2024-05-23 13:51:06 +02:00
parent a2a84a66bc
commit 985b4d4c17
26 changed files with 25 additions and 76 deletions

View File

@@ -18,6 +18,9 @@ let
self.nixosModules.clerie
({ config, lib, ... }: {
# Set hostname
networking.hostName = lib.mkDefault name;
# Apply overlays
nixpkgs.overlays = [
self.overlays.nixfilesInputs
@@ -59,7 +62,7 @@ let
];
};
mapToNixosConfigurations = hosts: builtins.mapAttrs (name: host: generateNixosSystem host) hosts;
mapToNixosConfigurations = hosts: builtins.mapAttrs (name: host: generateNixosSystem ({ inherit name; } // host)) hosts;
in
mapToNixosConfigurations self.clerie.hosts