Make VPN services conflict with each other

This commit is contained in:
Charlotte Van Petegem 2021-06-21 17:23:41 +02:00
parent 1cb0e4bdc7
commit a6d4f919cf
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -14,8 +14,14 @@
config = lib.mkIf config.chvp.vpn.ugent.enable {
systemd.services = {
ugent-global-vpn.after = [ "network.target" ];
ugent-local-vpn.after = [ "network.target" ];
ugent-global-vpn = {
after = [ "network.target" ];
conflicts = [ "ugent-local-vpn.service" ];
};
ugent-local-vpn = {
after = [ "network.target" ];
conflicts = [ "ugent-global-vpn.service" ];
};
};
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {