diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-05-15 15:27:19 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-05-15 15:27:19 +0200 |
commit | 1514c30e46768eb978996660ad46ca8e48cef5b7 (patch) | |
tree | c27da4992f00b4c7372020c367e8560d2355cfc7 /hosts/sif | |
parent | 9dddbe15c421b9f62cddee6f8cc4147f9d40cd86 (diff) | |
download | nixos-1514c30e46768eb978996660ad46ca8e48cef5b7.tar nixos-1514c30e46768eb978996660ad46ca8e48cef5b7.tar.gz nixos-1514c30e46768eb978996660ad46ca8e48cef5b7.tar.bz2 nixos-1514c30e46768eb978996660ad46ca8e48cef5b7.tar.xz nixos-1514c30e46768eb978996660ad46ca8e48cef5b7.zip |
...
Diffstat (limited to 'hosts/sif')
-rw-r--r-- | hosts/sif/default.nix | 27 |
1 files changed, 25 insertions, 2 deletions
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 @@ | |||
62 | networkmanager = { | 62 | networkmanager = { |
63 | enable = true; | 63 | enable = true; |
64 | dhcp = "internal"; | 64 | dhcp = "internal"; |
65 | dns = "dnsmasq"; | 65 | dns = lib.mkForce "dnsmasq"; |
66 | extraConfig = '' | 66 | extraConfig = '' |
67 | [connectivity] | 67 | [connectivity] |
68 | uri=https://online.yggdrasil.li | 68 | uri=https://online.yggdrasil.li |
69 | ''; | 69 | ''; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | wlanInterfaces = { | ||
73 | wlan0 = { | ||
74 | device = "wlp82s0"; | ||
75 | }; | ||
76 | }; | ||
77 | |||
78 | bonds = { | ||
79 | "lan" = { | ||
80 | interfaces = [ "wlan0" "enp0s31f6" "dock0" ]; | ||
81 | driverOptions = { | ||
82 | miimon = "1000"; | ||
83 | mode = "active-backup"; | ||
84 | primary_reselect = "always"; | ||
85 | }; | ||
86 | }; | ||
87 | }; | ||
88 | |||
72 | dhcpcd.enable = false; | 89 | dhcpcd.enable = false; |
90 | useDHCP = false; | ||
91 | useNetworkd = true; | ||
73 | 92 | ||
74 | interfaces.yggdrasil = { | 93 | interfaces.yggdrasil = { |
75 | virtual = true; | 94 | virtual = true; |
@@ -78,6 +97,9 @@ | |||
78 | }; | 97 | }; |
79 | }; | 98 | }; |
80 | 99 | ||
100 | systemd.services."NetworkManager-wait-online".enable = false; | ||
101 | systemd.services."systemd-networkd-wait-online".enable = false; | ||
102 | |||
81 | environment.etc."NetworkManager/dnsmasq.d/libvirtd_dnsmasq.conf" = { | 103 | environment.etc."NetworkManager/dnsmasq.d/libvirtd_dnsmasq.conf" = { |
82 | text = '' | 104 | text = '' |
83 | server=/sif.libvirt/192.168.122.1 | 105 | server=/sif.libvirt/192.168.122.1 |
@@ -263,9 +285,10 @@ | |||
263 | }; | 285 | }; |
264 | }; | 286 | }; |
265 | 287 | ||
266 | services.udev.extraRules = with pkgs; '' | 288 | services.udev.extraRules = with pkgs; lib.mkAfter '' |
267 | SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="${systemd}/bin/systemctl --no-block stop ac-plugged.service" | 289 | SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="${systemd}/bin/systemctl --no-block stop ac-plugged.service" |
268 | SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block start ac-plugged.service" | 290 | SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block start ac-plugged.service" |
291 | ACTION=="add", SUBSYSTEM=="net", DEVTYPE!="?*", ATTR{address}=="3c:e1:a1:b9:cd:e5", NAME="dock0" | ||
269 | ''; | 292 | ''; |
270 | 293 | ||
271 | services.borgbackup = { | 294 | services.borgbackup = { |