Don't start wireguard on boot

This commit is contained in:
Alexander Bantyev 2021-03-30 23:46:13 +03:00
parent 025a711879
commit cb89eb19d2
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5

View File

@ -40,6 +40,17 @@ in {
};
config = mkIf cfg.enable {
networking.firewall.checkReversePath = false;
systemd.services.wireguard-wg0.wantedBy = lib.mkForce [ ];
systemd.paths.wireguard-wg0.wantedBy = lib.mkForce [ ];
systemd.services."wireguard-wg0-peer-${
lib.replaceChars [ "/" "-" " " "+" "=" ] [
"-"
"\\x2d"
"\\x20"
"\\x2b"
"\\x3d"
] cfg.serverKey
}".wantedBy = lib.mkForce [ ];
networking.wireguard.interfaces.wg0 = let
generateRangesScript =
builtins.toFile "exclusionary-wildcard-ranges-generator.py" ''