summaryrefslogtreecommitdiff
path: root/machines/fourmi
diff options
context:
space:
mode:
Diffstat (limited to 'machines/fourmi')
-rw-r--r--machines/fourmi/devices.nix24
-rw-r--r--machines/fourmi/hardware.nix7
2 files changed, 17 insertions, 14 deletions
diff --git a/machines/fourmi/devices.nix b/machines/fourmi/devices.nix
index c8d2e72..56d243f 100644
--- a/machines/fourmi/devices.nix
+++ b/machines/fourmi/devices.nix
@@ -51,18 +51,28 @@
};
networking = {
- # todo: configure properly
firewall.enable = lib.mkForce false;
-
- useDHCP = true;
wireless = {
enable = true;
interfaces = [ "wlan0" ];
secretsFile = config.age.secrets.wireless-secrets.path;
- networks = {
- # yea this is my home network :3
- # (my boyfriends brother picked the name)
- "Das asoziale Netzwerk".pskRaw = "ext:psk_home";
+ networks."Das asoziale Netzwerk".pskRaw = "ext:psk_home";
+ };
+ };
+
+ systemd.network = {
+ networks = {
+ "10-wired" = {
+ name = "end0";
+ DHCP = "yes";
+ dhcpV4Config.RouteMetric = 100;
+ networkConfig.RequiredForOnline = "no";
+ };
+ "20-wireless" = {
+ name = "wlan0";
+ DHCP = "yes";
+ dhcpV4Config.RouteMetric = 600;
+ networkConfig.RequiredForOnline = "no";
};
};
};
diff --git a/machines/fourmi/hardware.nix b/machines/fourmi/hardware.nix
index 1738e23..3395bdf 100644
--- a/machines/fourmi/hardware.nix
+++ b/machines/fourmi/hardware.nix
@@ -20,12 +20,5 @@
swapDevices = [ ];
- # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
- # (the default) this is the recommended approach. When using systemd-networkd it's
- # still possible to use this option, but it's recommended to use it in conjunction
- # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
- networking.useDHCP = lib.mkDefault true;
- # networking.interfaces.end0.useDHCP = lib.mkDefault true;
- # networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
}