mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixos/openvpn: fix eval (#456734)
This commit is contained in:
commit
185831893d
1 changed files with 3 additions and 4 deletions
|
|
@ -75,7 +75,7 @@ let
|
||||||
pkgs.net-tools
|
pkgs.net-tools
|
||||||
];
|
];
|
||||||
|
|
||||||
serviceConfig.ExecStart = "@${cfg.package}/sbin/openvpn openvpn --suppress-timestamps --config ${configFile}";
|
serviceConfig.ExecStart = "@${config.services.openvpn.package}/sbin/openvpn openvpn --suppress-timestamps --config ${configFile}";
|
||||||
serviceConfig.Restart = "always";
|
serviceConfig.Restart = "always";
|
||||||
serviceConfig.Type = "notify";
|
serviceConfig.Type = "notify";
|
||||||
};
|
};
|
||||||
|
|
@ -102,6 +102,7 @@ in
|
||||||
###### interface
|
###### interface
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
services.openvpn.package = lib.mkPackageOption pkgs "openvpn" { };
|
||||||
|
|
||||||
services.openvpn.servers = mkOption {
|
services.openvpn.servers = mkOption {
|
||||||
default = { };
|
default = { };
|
||||||
|
|
@ -164,8 +165,6 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
package = lib.mkPackageOption pkgs "openvpn" { };
|
|
||||||
|
|
||||||
up = mkOption {
|
up = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
|
|
@ -254,7 +253,7 @@ in
|
||||||
))
|
))
|
||||||
// restartService;
|
// restartService;
|
||||||
|
|
||||||
environment.systemPackages = [ openvpn ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
boot.kernelModules = [ "tun" ];
|
boot.kernelModules = [ "tun" ];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue