From 1514c30e46768eb978996660ad46ca8e48cef5b7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 15 May 2021 15:27:19 +0200 Subject: ... --- hosts/sif/default.nix | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'hosts') diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index daa37ad9..b090f6a7 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix @@ -62,14 +62,33 @@ networkmanager = { enable = true; dhcp = "internal"; - dns = "dnsmasq"; + dns = lib.mkForce "dnsmasq"; extraConfig = '' [connectivity] uri=https://online.yggdrasil.li ''; }; + wlanInterfaces = { + wlan0 = { + device = "wlp82s0"; + }; + }; + + bonds = { + "lan" = { + interfaces = [ "wlan0" "enp0s31f6" "dock0" ]; + driverOptions = { + miimon = "1000"; + mode = "active-backup"; + primary_reselect = "always"; + }; + }; + }; + dhcpcd.enable = false; + useDHCP = false; + useNetworkd = true; interfaces.yggdrasil = { virtual = true; @@ -78,6 +97,9 @@ }; }; + systemd.services."NetworkManager-wait-online".enable = false; + systemd.services."systemd-networkd-wait-online".enable = false; + environment.etc."NetworkManager/dnsmasq.d/libvirtd_dnsmasq.conf" = { text = '' server=/sif.libvirt/192.168.122.1 @@ -263,9 +285,10 @@ }; }; - services.udev.extraRules = with pkgs; '' + services.udev.extraRules = with pkgs; lib.mkAfter '' SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="${systemd}/bin/systemctl --no-block stop ac-plugged.service" SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block start ac-plugged.service" + ACTION=="add", SUBSYSTEM=="net", DEVTYPE!="?*", ATTR{address}=="3c:e1:a1:b9:cd:e5", NAME="dock0" ''; services.borgbackup = { -- cgit v1.2.3