diff --git a/flake.nix b/flake.nix index abf573a..20c6d3e 100644 --- a/flake.nix +++ b/flake.nix @@ -65,6 +65,8 @@ ( { pkgs, ... }@args: { config._module.args = { + hostname = name; + machineConfig = (default args) // (config args) // { inherit name; diff --git a/lib/configuration.nix b/lib/configuration.nix index 2ee9489..6ec7bd1 100644 --- a/lib/configuration.nix +++ b/lib/configuration.nix @@ -1,4 +1,4 @@ -{ machineConfig, ... }: { +{ hostname, machineConfig, ... }: { imports = [ ./modules/custom-build-vm.nix ./modules/custom-sops-nix.nix @@ -30,7 +30,7 @@ users.myUsers = machineConfig.users; # Networking - networking.hostName = machineConfig.name; + networking.hostName = hostname; # Set time zone time.timeZone = machineConfig.timeZone;