diff --git a/flake.nix b/flake.nix index c400fd1..e127b82 100644 --- a/flake.nix +++ b/flake.nix @@ -105,6 +105,9 @@ } // specialArgs; modules = [ + { + networking.hostName = lib.mkDefault name; + } configurationPath ] ++ (lib.optionals enableDefaults [ sops-nix.nixosModules.sops diff --git a/hosts/bakke/configuration.nix b/hosts/bakke/configuration.nix index e4a9969..3554fdf 100644 --- a/hosts/bakke/configuration.nix +++ b/hosts/bakke/configuration.nix @@ -11,7 +11,6 @@ sops.age.keyFile = "/var/lib/sops-nix/key.txt"; sops.age.generateKey = true; - networking.hostName = "bakke"; networking.hostId = "99609ffc"; systemd.network.networks."30-enp2s0" = values.defaultNetworkConfig // { matchConfig.Name = "enp2s0"; diff --git a/hosts/bekkalokk/configuration.nix b/hosts/bekkalokk/configuration.nix index a6838f9..684d6af 100644 --- a/hosts/bekkalokk/configuration.nix +++ b/hosts/bekkalokk/configuration.nix @@ -24,8 +24,6 @@ sops.age.keyFile = "/var/lib/sops-nix/key.txt"; sops.age.generateKey = true; - networking.hostName = "bekkalokk"; - systemd.network.networks."30-enp2s0" = values.defaultNetworkConfig // { matchConfig.Name = "enp2s0"; address = with values.hosts.bekkalokk; [ (ipv4 + "/25") (ipv6 + "/64") ]; diff --git a/hosts/bicep/configuration.nix b/hosts/bicep/configuration.nix index 69d7681..fccf239 100644 --- a/hosts/bicep/configuration.nix +++ b/hosts/bicep/configuration.nix @@ -20,8 +20,6 @@ sops.age.keyFile = "/var/lib/sops-nix/key.txt"; sops.age.generateKey = true; - networking.hostName = "bicep"; - #systemd.network.networks."30-enp6s0f0" = values.defaultNetworkConfig // { systemd.network.networks."30-ens18" = values.defaultNetworkConfig // { #matchConfig.Name = "enp6s0f0"; diff --git a/hosts/brzeczyszczykiewicz/configuration.nix b/hosts/brzeczyszczykiewicz/configuration.nix index 14105ed..d5d443a 100644 --- a/hosts/brzeczyszczykiewicz/configuration.nix +++ b/hosts/brzeczyszczykiewicz/configuration.nix @@ -8,8 +8,6 @@ ./services/grzegorz.nix ]; - networking.hostName = "brzeczyszczykiewicz"; - systemd.network.networks."30-eno1" = values.defaultNetworkConfig // { matchConfig.Name = "eno1"; address = with values.hosts.brzeczyszczykiewicz; [ (ipv4 + "/25") (ipv6 + "/64") ]; diff --git a/hosts/georg/configuration.nix b/hosts/georg/configuration.nix index 1d17eaa..e4cdac1 100644 --- a/hosts/georg/configuration.nix +++ b/hosts/georg/configuration.nix @@ -8,8 +8,6 @@ (fp /modules/grzegorz.nix) ]; - networking.hostName = "georg"; - systemd.network.networks."30-eno1" = values.defaultNetworkConfig // { matchConfig.Name = "eno1"; address = with values.hosts.georg; [ (ipv4 + "/25") (ipv6 + "/64") ]; diff --git a/hosts/gluttony/configuration.nix b/hosts/gluttony/configuration.nix index eec08e4..d907567 100644 --- a/hosts/gluttony/configuration.nix +++ b/hosts/gluttony/configuration.nix @@ -18,7 +18,6 @@ hostConf = values.hosts.gluttony; in { - hostName = "gluttony"; tempAddresses = "disabled"; useDHCP = false; diff --git a/hosts/ildkule/configuration.nix b/hosts/ildkule/configuration.nix index 62f0429..b059459 100644 --- a/hosts/ildkule/configuration.nix +++ b/hosts/ildkule/configuration.nix @@ -25,7 +25,6 @@ networking = let hostConf = values.hosts.ildkule; in { - hostName = "ildkule"; tempAddresses = "disabled"; useDHCP = lib.mkForce true; diff --git a/hosts/kommode/configuration.nix b/hosts/kommode/configuration.nix index a29764b..94ef917 100644 --- a/hosts/kommode/configuration.nix +++ b/hosts/kommode/configuration.nix @@ -14,8 +14,6 @@ sops.age.keyFile = "/var/lib/sops-nix/key.txt"; sops.age.generateKey = true; - networking.hostName = "kommode"; # Define your hostname. - systemd.network.networks."30-ens18" = values.defaultNetworkConfig // { matchConfig.Name = "ens18"; address = with values.hosts.kommode; [ (ipv4 + "/25") (ipv6 + "/64") ]; diff --git a/hosts/shark/configuration.nix b/hosts/shark/configuration.nix index 6c6a235..5d54974 100644 --- a/hosts/shark/configuration.nix +++ b/hosts/shark/configuration.nix @@ -11,8 +11,6 @@ sops.age.keyFile = "/var/lib/sops-nix/key.txt"; sops.age.generateKey = true; - networking.hostName = "shark"; # Define your hostname. - systemd.network.networks."30-ens18" = values.defaultNetworkConfig // { matchConfig.Name = "ens18"; address = with values.hosts.shark; [ (ipv4 + "/25") (ipv6 + "/64") ]; diff --git a/hosts/temmie/configuration.nix b/hosts/temmie/configuration.nix index 8a3f0a5..d3f4fda 100644 --- a/hosts/temmie/configuration.nix +++ b/hosts/temmie/configuration.nix @@ -13,9 +13,6 @@ # sops.age.keyFile = "/var/lib/sops-nix/key.txt"; # sops.age.generateKey = true; - - networking.hostName = "temmie"; # Define your hostname. - systemd.network.networks."30-ens18" = values.defaultNetworkConfig // { matchConfig.Name = "ens18"; address = with values.hosts.temmie; [ (ipv4 + "/25") (ipv6 + "/64") ]; diff --git a/hosts/ustetind/configuration.nix b/hosts/ustetind/configuration.nix index 5f50f34..be74d4a 100644 --- a/hosts/ustetind/configuration.nix +++ b/hosts/ustetind/configuration.nix @@ -12,8 +12,6 @@ sops.age.keyFile = "/var/lib/sops-nix/key.txt"; sops.age.generateKey = true; - networking.hostName = "ustetind"; - boot.loader.systemd-boot.enable = false; networking.useHostResolvConf = lib.mkForce false; diff --git a/hosts/wenche/configuration.nix b/hosts/wenche/configuration.nix index 3aa150d..43a4afc 100644 --- a/hosts/wenche/configuration.nix +++ b/hosts/wenche/configuration.nix @@ -22,8 +22,6 @@ boot.loader.systemd-boot.enable = false; boot.loader.grub.device = "/dev/sda"; - networking.hostName = "wenche"; # Define your hostname. - systemd.network.networks."30-ens18" = values.defaultNetworkConfig // { matchConfig.Name = "ens18"; address = with values.hosts.wenche; [ (ipv4 + "/25") (ipv6 + "/64") ];