diff options
| author | Aaron Andersen <aaron@fosslib.net> | 2022-06-10 11:17:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-10 11:17:28 -0400 |
| commit | 4c6ef982da9e772c0fc2910eb5c5b5cdacde8a7f (patch) | |
| tree | 520ffcf35cb080d3d24968badcdc04a3aff7f3be | |
| parent | Merge pull request #177119 from NixOS/backport-175177-to-release-22.05 (diff) | |
| parent | nixos/openconnect: add autoStart option (diff) | |
| download | nixpkgs-4c6ef982da9e772c0fc2910eb5c5b5cdacde8a7f.tar.gz | |
Merge pull request #177076 from NixOS/backport-174959-to-release-22.05
[Backport release-22.05] nixos/openconnect: add autoStart option
| -rw-r--r-- | nixos/modules/services/networking/openconnect.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/openconnect.nix b/nixos/modules/services/networking/openconnect.nix index de4b505130eb..bc873b2198bc 100644 --- a/nixos/modules/services/networking/openconnect.nix +++ b/nixos/modules/services/networking/openconnect.nix @@ -9,6 +9,12 @@ let }; interfaceOptions = { options = { + autoStart = mkOption { + default = true; + description = "Whether this VPN connection should be started automatically."; + type = types.bool; + }; + gateway = mkOption { description = "Gateway server to connect to."; example = "gateway.example.com"; @@ -95,7 +101,7 @@ let description = "OpenConnect Interface - ${name}"; requires = [ "network-online.target" ]; after = [ "network.target" "network-online.target" ]; - wantedBy = [ "multi-user.target" ]; + wantedBy = optional icfg.autoStart "multi-user.target"; serviceConfig = { Type = "simple"; |
