Skip to content

Commit

Permalink
nixos/services.openvpn: add package option
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie-collard authored Nov 7, 2024
1 parent 9d4343b commit df946cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nixos/modules/services/networking/openvpn.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ let

cfg = config.services.openvpn;

inherit (pkgs) openvpn;

makeOpenVPNJob = cfg: name:
let

Expand Down Expand Up @@ -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";
};
Expand Down Expand Up @@ -150,6 +148,8 @@ in
'';
};

package = lib.mkPackageOption pkgs "openvpn" { };

up = mkOption {
default = "";
type = types.lines;
Expand Down

0 comments on commit df946cc

Please sign in to comment.