From df946cc9a50ca3d8007949a412136c01414848c4 Mon Sep 17 00:00:00 2001 From: Charlie Collard Date: Thu, 7 Nov 2024 19:29:04 +0000 Subject: [PATCH] nixos/services.openvpn: add package option --- nixos/modules/services/networking/openvpn.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/networking/openvpn.nix b/nixos/modules/services/networking/openvpn.nix index 56b1f6f5ab8f2..0e6c3f376a8d8 100644 --- a/nixos/modules/services/networking/openvpn.nix +++ b/nixos/modules/services/networking/openvpn.nix @@ -6,8 +6,6 @@ let cfg = config.services.openvpn; - inherit (pkgs) openvpn; - makeOpenVPNJob = cfg: name: let @@ -64,7 +62,7 @@ let path = [ pkgs.iptables pkgs.iproute2 pkgs.nettools ]; - 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"; }; @@ -150,6 +148,8 @@ in ''; }; + package = lib.mkPackageOption pkgs "openvpn" { }; + up = mkOption { default = ""; type = types.lines;