summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--os/cez/modules/headscale.nix1
-rw-r--r--os/common/configuration.nix1
-rw-r--r--os/pc/modules/network.nix29
3 files changed, 27 insertions, 4 deletions
diff --git a/os/cez/modules/headscale.nix b/os/cez/modules/headscale.nix
index 169ed45..4c9f6fd 100644
--- a/os/cez/modules/headscale.nix
+++ b/os/cez/modules/headscale.nix
@@ -37,7 +37,6 @@ in
services.tailscale = {
enable = true;
- interfaceName = "headscale";
openFirewall = true;
authKeyFile = config.sops.secrets."misc/headscale".path;
diff --git a/os/common/configuration.nix b/os/common/configuration.nix
index f4f3093..d1ea0e5 100644
--- a/os/common/configuration.nix
+++ b/os/common/configuration.nix
@@ -27,6 +27,7 @@ in
useDHCP = false;
hostName = lib.mkOptionDefault "common";
};
+ systemd.network.enable = true;
zramSwap.enable = true;
swapDevices = lib.mkDefault [
diff --git a/os/pc/modules/network.nix b/os/pc/modules/network.nix
index eeb5b0e..8841547 100644
--- a/os/pc/modules/network.nix
+++ b/os/pc/modules/network.nix
@@ -1,7 +1,30 @@
-{ ... }:
{
- networking.wireless.iwd = {
+ networking.wireless.iwd.enable = true;
+
+ systemd.network = {
enable = true;
- settings.General.EnableNetworkConfiguration = true;
+ networks = {
+ "99-wireless-dhcp" = {
+ matchConfig.Type = "wlan";
+ networkConfig.DHCP = "yes";
+ dhcpV4Config = {
+ UseHostname = "no";
+ UseDNS = "no";
+ };
+ dhcpV6Config.UseDNS = "no";
+ };
+ "99-wired-dhcp" = {
+ matchConfig = {
+ Kind = "!*";
+ Type = "ether";
+ };
+ networkConfig.DHCP = "yes";
+ dhcpV4Config = {
+ UseHostname = "no";
+ UseDNS = "no";
+ };
+ dhcpV6Config.UseDNS = "no";
+ };
+ };
};
}