diff --git a/flake.nix b/flake.nix index 8af709c..b5f9187 100644 --- a/flake.nix +++ b/flake.nix @@ -74,7 +74,10 @@ nixosConfigurations = mkNixosSystems (name: machine: { inherit system; specialArgs = { inherit machines machine kubenix dns microvm disko agenix; }; - modules = [ ./nixos ]; + modules = [ + ./nixos + { networking.hostName = name; } + ]; }); deploy = { diff --git a/nixos/machines/default.nix b/nixos/machines/default.nix index 649ef3d..5a690e4 100644 --- a/nixos/machines/default.nix +++ b/nixos/machines/default.nix @@ -3,8 +3,6 @@ type = "physical"; nixosModule = { - networking.hostName = "jefke"; - lab = { terraformDatabase.enable = true; @@ -29,8 +27,6 @@ nixosModule = { config, ... }: let inherit (config.lab.networking) dmzServicesIPv4 dmzServicesIPv6; in { - networking.hostName = "atlas"; - lab = { networking = { # TODO: Ideally, we don't have to set this here. @@ -57,8 +53,6 @@ type = "physical"; nixosModule = { - networking.hostName = "lewis"; - lab = { dataHost.enable = true; @@ -81,7 +75,6 @@ hypervisorName = "lewis"; nixosModule = { pkgs, ... }: { - networking.hostName = "my-microvm"; lab.vmMacAddress = "BA:DB:EE:F0:00:00"; programs.bash.interactiveShellInit = '' diff --git a/nixos/physical.nix b/nixos/physical.nix index 35858fb..129c201 100644 --- a/nixos/physical.nix +++ b/nixos/physical.nix @@ -65,11 +65,10 @@ { # TODO Simplify? specialArgs = { inherit agenix disko pkgs lib microvm; machine = vm; hypervisorConfig = config; }; - config = { - imports = [ - ./. - ]; - }; + config.imports = [ + ./. + { networking.hostName = name; } + ]; } ) vmsForHypervisor;