summaryrefslogtreecommitdiff
path: root/modules/yggdrasil-wg
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-12-01 14:04:07 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2021-12-01 14:04:07 +0100
commit8a2017bc1ae62362c256cc0a18f4226291c027ea (patch)
tree2c9069404d01fe769e452baaa3e90e89fbf3fa63 /modules/yggdrasil-wg
parent3c65a41b89dd539de55e897e32c74b12a5c07a5a (diff)
downloadnixos-8a2017bc1ae62362c256cc0a18f4226291c027ea.tar
nixos-8a2017bc1ae62362c256cc0a18f4226291c027ea.tar.gz
nixos-8a2017bc1ae62362c256cc0a18f4226291c027ea.tar.bz2
nixos-8a2017bc1ae62362c256cc0a18f4226291c027ea.tar.xz
nixos-8a2017bc1ae62362c256cc0a18f4226291c027ea.zip
yggdrasil-wg: networkmanager unmanaged
Diffstat (limited to 'modules/yggdrasil-wg')
-rw-r--r--modules/yggdrasil-wg/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix
index c3940d4d..b1d4ee5d 100644
--- a/modules/yggdrasil-wg/default.nix
+++ b/modules/yggdrasil-wg/default.nix
@@ -217,5 +217,6 @@ in {
217 217
218 boot.extraModulePackages = optional (versionOlder kernel.kernel.version "5.6") kernel.wireguard ++ [kernel.batman_adv]; 218 boot.extraModulePackages = optional (versionOlder kernel.kernel.version "5.6") kernel.wireguard ++ [kernel.batman_adv];
219 environment.systemPackages = with pkgs; [ wireguard-tools batctl ]; 219 environment.systemPackages = with pkgs; [ wireguard-tools batctl ];
220 services.udev.extraRules = mkIf config.networking.networkmanager.enable (lib.mkAfter (concatMapStringsSep "\n" (dev: "ACTION==\"add\", SUBSYSTEM==\"net\", KERNEL==\"${dev}\", ENV{NM_UNMANAGED}=\"1\"") (["yggdrasil"] ++ map (family: "yggdrasil-wg-${family}") hostFamilies ++ concatMap (family: map ({from, to, ...}: let other = if thisHost from then to else from; in "yggre-${other}-${family}") hostLinks.${family}) hostFamilies)));
220 }; 221 };
221} 222}