summaryrefslogtreecommitdiff
path: root/hosts/toaster/network/full-networkd.nix
diff options
context:
space:
mode:
authorGrisha Shipunov2025-03-20 18:20:20 +0100
committerGrisha Shipunov2025-03-23 02:54:53 +0100
commit0598c3f08df38d29d0941135118df8e4da55b9fc (patch)
tree35f791ae6452ad08f7650109ae437763f7d5d20d /hosts/toaster/network/full-networkd.nix
parent853e0809cc10c4fc6f01f10c0fb935b165e8c78a (diff)
gnome
Diffstat (limited to 'hosts/toaster/network/full-networkd.nix')
-rw-r--r--hosts/toaster/network/full-networkd.nix71
1 files changed, 71 insertions, 0 deletions
diff --git a/hosts/toaster/network/full-networkd.nix b/hosts/toaster/network/full-networkd.nix
new file mode 100644
index 0000000..ee0bdbe
--- /dev/null
+++ b/hosts/toaster/network/full-networkd.nix
@@ -0,0 +1,71 @@
+{ lib, pkgs, ... }:
+{
+ imports = [
+ ./mullvad.nix
+ ./dumpdvb.nix
+ ./zw.nix
+ ];
+
+ environment.systemPackages = with pkgs; [
+ iwgtk
+ impala
+ ];
+
+ # kick out networkmanager
+ networking.networkmanager.enable = lib.mkForce false;
+ networking.useNetworkd = true;
+ systemd.network.enable = true;
+
+ networking = {
+ hostName = "toaster";
+ firewall.enable = true;
+ wireguard.enable = true;
+ wireless.iwd.enable = true;
+ };
+
+ services.resolved = {
+ enable = true;
+ dnssec = "false";
+ fallbackDns = [
+ "9.9.9.9"
+ "2620:fe::fe"
+ "149.112.112.112"
+ "2620:fe::9"
+ ];
+ };
+
+ # we might have no interwebs at all
+ systemd.network.wait-online.enable = false;
+
+ # uplinks
+ systemd.network.networks = {
+ "10-ether-uplink" = {
+ matchConfig.Name = "enp1s0f0";
+ networkConfig = {
+ DHCP = "yes";
+ IPv6AcceptRA = true;
+ };
+ };
+ "10-dock-uplink" = {
+ matchConfig.Name = "enp5s0f4u1u1";
+ networkConfig = {
+ DHCP = "yes";
+ IPv6AcceptRA = true;
+ };
+ dhcpV4Config = {
+ RouteMetric = 666;
+ };
+ dhcpV6Config = {
+ RouteMetric = 666;
+ };
+ };
+ "wlan-uplink" = {
+ matchConfig.Name = "wlan0";
+ networkConfig = {
+ DHCP = "yes";
+ IPv6AcceptRA = true;
+ };
+ };
+ };
+
+}