flake/nixosConfigurations.nix: Generate hostname from host attribute name
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user