From 8af0eb238639180feb6a417f5f506aae6558349e Mon Sep 17 00:00:00 2001
From: clerie <git@clerie.de>
Date: Mon, 7 Apr 2025 21:27:03 +0200
Subject: [PATCH] profiles/common: Make common-networking the default

---
 hosts/_iso/configuration.nix               | 3 ---
 hosts/aluminium/configuration.nix          | 3 ---
 hosts/astatine/configuration.nix           | 3 ---
 hosts/beryllium/configuration.nix          | 3 ---
 hosts/carbon/configuration.nix             | 2 ++
 hosts/clerie-backup/configuration.nix      | 3 ---
 hosts/dn42-il-gw1/configuration.nix        | 1 -
 hosts/dn42-il-gw5/configuration.nix        | 1 -
 hosts/dn42-il-gw6/configuration.nix        | 1 -
 hosts/dn42-ildix-clerie/configuration.nix  | 1 -
 hosts/dn42-ildix-service/configuration.nix | 1 -
 hosts/gatekeeper/configuration.nix         | 3 ---
 hosts/hydra-1/configuration.nix            | 3 ---
 hosts/hydra-2/configuration.nix            | 3 ---
 hosts/krypton/network.nix                  | 2 --
 hosts/mail-2/configuration.nix             | 3 ---
 hosts/monitoring-3/configuration.nix       | 3 ---
 hosts/nonat/configuration.nix              | 3 ---
 hosts/osmium/configuration.nix             | 3 ---
 hosts/palladium/configuration.nix          | 3 ---
 hosts/porter/configuration.nix             | 2 --
 hosts/storage-2/configuration.nix          | 3 ---
 hosts/tungsten/configuration.nix           | 3 ---
 hosts/web-2/configuration.nix              | 3 ---
 hosts/zinc/configuration.nix               | 2 --
 profiles/common/default.nix                | 5 ++---
 26 files changed, 4 insertions(+), 62 deletions(-)

diff --git a/hosts/_iso/configuration.nix b/hosts/_iso/configuration.nix
index b4af756..9d267aa 100644
--- a/hosts/_iso/configuration.nix
+++ b/hosts/_iso/configuration.nix
@@ -13,9 +13,6 @@
   # https://github.com/NixOS/nixpkgs/issues/327187
   boot.initrd.systemd.enable = false;
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   networking.hostName = "isowo";
   isoImage.isoBaseName = lib.mkForce "nixos-isowo";
 
diff --git a/hosts/aluminium/configuration.nix b/hosts/aluminium/configuration.nix
index 87d0aa0..a753a9c 100644
--- a/hosts/aluminium/configuration.nix
+++ b/hosts/aluminium/configuration.nix
@@ -18,9 +18,6 @@
     terminal_output serial
   ";
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   profiles.clerie.wg-clerie = {
     enable = true;
     ipv6s = [ "2a01:4f8:c0c:15f1::8106/128" ];
diff --git a/hosts/astatine/configuration.nix b/hosts/astatine/configuration.nix
index 72ad6bd..74fed00 100644
--- a/hosts/astatine/configuration.nix
+++ b/hosts/astatine/configuration.nix
@@ -18,9 +18,6 @@
     terminal_output serial
   ";
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   profiles.clerie.wg-clerie = {
     enable = true;
     ipv6s = [ "2a01:4f8:c0c:15f1::8108/128" ];
diff --git a/hosts/beryllium/configuration.nix b/hosts/beryllium/configuration.nix
index 274d44c..4a6fd4c 100644
--- a/hosts/beryllium/configuration.nix
+++ b/hosts/beryllium/configuration.nix
@@ -20,9 +20,6 @@
 
   networking.hostName = "beryllium";
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   networking.firewall.enable = false;
 
   profiles.clerie.wg-clerie = {
diff --git a/hosts/carbon/configuration.nix b/hosts/carbon/configuration.nix
index 0f6387b..5bf6cf3 100644
--- a/hosts/carbon/configuration.nix
+++ b/hosts/carbon/configuration.nix
@@ -22,6 +22,8 @@
       ./wg-clerie.nix
     ];
 
+  profiles.clerie.common-networking.enable = false;
+
   boot.kernelParams = [ "console=ttyS0,115200n8" ];
 
   boot.loader.grub.enable = true;
diff --git a/hosts/clerie-backup/configuration.nix b/hosts/clerie-backup/configuration.nix
index bca9dd8..0fd7e09 100644
--- a/hosts/clerie-backup/configuration.nix
+++ b/hosts/clerie-backup/configuration.nix
@@ -13,9 +13,6 @@
   boot.loader.grub.enable = true;
   boot.loader.grub.device = "/dev/vda";
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   systemd.network.networks."10-wan" = {
     matchConfig.Name = "ens18";
     address = [
diff --git a/hosts/dn42-il-gw1/configuration.nix b/hosts/dn42-il-gw1/configuration.nix
index 6eb8ea2..f447802 100644
--- a/hosts/dn42-il-gw1/configuration.nix
+++ b/hosts/dn42-il-gw1/configuration.nix
@@ -7,7 +7,6 @@
     ];
 
   profiles.clerie.mercury-vm.enable = true;
-  profiles.clerie.common-networking.enable = true;
 
   boot.loader.grub.enable = true;
   boot.loader.grub.device = "/dev/vda";
diff --git a/hosts/dn42-il-gw5/configuration.nix b/hosts/dn42-il-gw5/configuration.nix
index 73c43e6..c6befb3 100644
--- a/hosts/dn42-il-gw5/configuration.nix
+++ b/hosts/dn42-il-gw5/configuration.nix
@@ -7,7 +7,6 @@
     ];
 
   profiles.clerie.mercury-vm.enable = true;
-  profiles.clerie.common-networking.enable = true;
 
   boot.loader.grub.enable = true;
   boot.loader.grub.device = "/dev/vda";
diff --git a/hosts/dn42-il-gw6/configuration.nix b/hosts/dn42-il-gw6/configuration.nix
index 1615e77..4e9354f 100644
--- a/hosts/dn42-il-gw6/configuration.nix
+++ b/hosts/dn42-il-gw6/configuration.nix
@@ -7,7 +7,6 @@
     ];
 
   profiles.clerie.cybercluster-vm.enable = true;
-  profiles.clerie.common-networking.enable = true;
 
   boot.loader.grub.enable = true;
   boot.loader.grub.device = "/dev/vda";
diff --git a/hosts/dn42-ildix-clerie/configuration.nix b/hosts/dn42-ildix-clerie/configuration.nix
index c51fb69..be9fd50 100644
--- a/hosts/dn42-ildix-clerie/configuration.nix
+++ b/hosts/dn42-ildix-clerie/configuration.nix
@@ -7,7 +7,6 @@
     ];
 
   profiles.clerie.mercury-vm.enable = true;
-  profiles.clerie.common-networking.enable = true;
 
   boot.loader.grub.enable = true;
   boot.loader.grub.device = "/dev/vda";
diff --git a/hosts/dn42-ildix-service/configuration.nix b/hosts/dn42-ildix-service/configuration.nix
index 8c1b997..15c21b5 100644
--- a/hosts/dn42-ildix-service/configuration.nix
+++ b/hosts/dn42-ildix-service/configuration.nix
@@ -10,7 +10,6 @@
     ];
 
   profiles.clerie.mercury-vm.enable = true;
-  profiles.clerie.common-networking.enable = true;
 
   # Use the GRUB 2 boot loader.
   boot.loader.grub.enable = true;
diff --git a/hosts/gatekeeper/configuration.nix b/hosts/gatekeeper/configuration.nix
index 4c7eee9..3af79d9 100644
--- a/hosts/gatekeeper/configuration.nix
+++ b/hosts/gatekeeper/configuration.nix
@@ -12,9 +12,6 @@
   boot.loader.grub.enable = true;
   boot.loader.grub.device = "/dev/sda";
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   systemd.network.networks."10-wan" = {
     address = [
       "2a01:4f8:c0c:15f1::1/64"
diff --git a/hosts/hydra-1/configuration.nix b/hosts/hydra-1/configuration.nix
index 9788887..c4d58d6 100644
--- a/hosts/hydra-1/configuration.nix
+++ b/hosts/hydra-1/configuration.nix
@@ -22,9 +22,6 @@
     "aarch64-linux"
   ];
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   systemd.network.networks."10-wan" = {
     matchConfig.Name = "ens18";
     address = [
diff --git a/hosts/hydra-2/configuration.nix b/hosts/hydra-2/configuration.nix
index 8b32cc2..870701c 100644
--- a/hosts/hydra-2/configuration.nix
+++ b/hosts/hydra-2/configuration.nix
@@ -18,9 +18,6 @@
     "aarch64-linux"
   ];
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   systemd.network.networks."10-wan" = {
     matchConfig.Name = "ens18";
     address = [
diff --git a/hosts/krypton/network.nix b/hosts/krypton/network.nix
index fb71faf..fe7db13 100644
--- a/hosts/krypton/network.nix
+++ b/hosts/krypton/network.nix
@@ -1,8 +1,6 @@
 { ... }:
 
 {
-  profiles.clerie.common-networking.enable = true;
-
   profiles.clerie.wg-clerie = {
     enable = true;
     ipv6s = [ "2a01:4f8:c0c:15f1::8011/128" ];
diff --git a/hosts/mail-2/configuration.nix b/hosts/mail-2/configuration.nix
index 0086f74..eeaea85 100644
--- a/hosts/mail-2/configuration.nix
+++ b/hosts/mail-2/configuration.nix
@@ -13,9 +13,6 @@
   boot.loader.grub.enable = true;
   boot.loader.grub.device = "/dev/sda";
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   systemd.network.networks."10-wan" = {
     address = [
       "2a01:4f8:1c1c:9577::1/64"
diff --git a/hosts/monitoring-3/configuration.nix b/hosts/monitoring-3/configuration.nix
index 54ff328..e7c3e8e 100644
--- a/hosts/monitoring-3/configuration.nix
+++ b/hosts/monitoring-3/configuration.nix
@@ -18,9 +18,6 @@
   boot.loader.grub.enable = true;
   boot.loader.grub.device = "/dev/sda";
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   systemd.network.networks."10-wan" = {
     matchConfig.Name = "ens19";
     address = [
diff --git a/hosts/nonat/configuration.nix b/hosts/nonat/configuration.nix
index 741055c..47d7495 100644
--- a/hosts/nonat/configuration.nix
+++ b/hosts/nonat/configuration.nix
@@ -12,9 +12,6 @@
   boot.loader.grub.enable = true;
   boot.loader.grub.device = "/dev/vda";
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   systemd.network.networks."10-wan" = {
     matchConfig.Name = "ens18";
     address = [
diff --git a/hosts/osmium/configuration.nix b/hosts/osmium/configuration.nix
index 83aae36..0203384 100644
--- a/hosts/osmium/configuration.nix
+++ b/hosts/osmium/configuration.nix
@@ -20,9 +20,6 @@
     "aarch64-linux"
   ];
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   systemd.network.networks."10-wan" = {
     matchConfig.Name = "ens19";
     address = [
diff --git a/hosts/palladium/configuration.nix b/hosts/palladium/configuration.nix
index 7ac2f64..7790fce 100644
--- a/hosts/palladium/configuration.nix
+++ b/hosts/palladium/configuration.nix
@@ -30,9 +30,6 @@
 
   boot.swraid.enable = true;
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   systemd.network.networks."10-wan" = {
     matchConfig.Name = "enp3s0";
     address = [
diff --git a/hosts/porter/configuration.nix b/hosts/porter/configuration.nix
index 7974fb1..30d3851 100644
--- a/hosts/porter/configuration.nix
+++ b/hosts/porter/configuration.nix
@@ -12,8 +12,6 @@
   boot.loader.grub.enable = true;
   boot.loader.grub.device = "/dev/sda";
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
   systemd.network.networks."10-wan" = {
     matchConfig.Name = "ens3";
     address = [
diff --git a/hosts/storage-2/configuration.nix b/hosts/storage-2/configuration.nix
index 403171f..88f13cc 100644
--- a/hosts/storage-2/configuration.nix
+++ b/hosts/storage-2/configuration.nix
@@ -15,9 +15,6 @@
   boot.loader.grub.enable = true;
   boot.loader.grub.device = "/dev/vda";
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   systemd.network.networks."10-wan" = {
     matchConfig.Name = "ens18";
     address = [
diff --git a/hosts/tungsten/configuration.nix b/hosts/tungsten/configuration.nix
index 2751f57..9906604 100644
--- a/hosts/tungsten/configuration.nix
+++ b/hosts/tungsten/configuration.nix
@@ -18,9 +18,6 @@
     terminal_output serial
   ";
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   networking.hostName = "tungsten";
 
   profiles.clerie.wg-clerie = {
diff --git a/hosts/web-2/configuration.nix b/hosts/web-2/configuration.nix
index 93ea4f5..fd45575 100644
--- a/hosts/web-2/configuration.nix
+++ b/hosts/web-2/configuration.nix
@@ -33,9 +33,6 @@
   boot.loader.grub.enable = true;
   boot.loader.grub.device = "/dev/sda";
 
-  networking.useDHCP = false;
-  systemd.network.enable = true;
-
   systemd.network.networks."10-wan" = {
     address = [
       "2a01:4f8:c0c:c580::1/64"
diff --git a/hosts/zinc/configuration.nix b/hosts/zinc/configuration.nix
index 07c0747..4567591 100644
--- a/hosts/zinc/configuration.nix
+++ b/hosts/zinc/configuration.nix
@@ -11,8 +11,6 @@
       ./programs.nix
     ];
 
-  profiles.clerie.common-networking.enable = true;
-
   # Use the systemd-boot EFI boot loader.
   boot.loader.systemd-boot.enable = true;
   boot.loader.efi.canTouchEfiVariables = true;
diff --git a/profiles/common/default.nix b/profiles/common/default.nix
index 7cf3a64..186683c 100644
--- a/profiles/common/default.nix
+++ b/profiles/common/default.nix
@@ -10,10 +10,9 @@ with lib;
 
   config = mkIf config.profiles.clerie.common.enable {
 
-    profiles.clerie.common-dns.enable = true;
+    profiles.clerie.common-dns.enable = mkDefault true;
 
-    # Disabled while we are still in transition
-    #profiles.clerie.common-network.enable = true;
+    profiles.clerie.common-networking.enable = mkDefault true;
 
   };
 }