nixos/services.openvpn: add package option (#354301)

This commit is contained in:
Sandro 2025-10-29 12:21:53 +00:00 committed by GitHub
commit 2e8953486b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,8 +11,6 @@ let
cfg = config.services.openvpn;
inherit (pkgs) openvpn;
makeOpenVPNJob =
cfg: name:
let
@ -77,7 +75,7 @@ let
pkgs.net-tools
];
serviceConfig.ExecStart = "@${openvpn}/sbin/openvpn openvpn --suppress-timestamps --config ${configFile}";
serviceConfig.ExecStart = "@${cfg.package}/sbin/openvpn openvpn --suppress-timestamps --config ${configFile}";
serviceConfig.Restart = "always";
serviceConfig.Type = "notify";
};
@ -166,6 +164,8 @@ in
'';
};
package = lib.mkPackageOption pkgs "openvpn" { };
up = mkOption {
default = "";
type = types.lines;