diff options
author | alyaeanyx <alyaeanyx@mailbox.org> | 2022-12-29 09:43:16 +0100 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2022-12-30 10:10:54 +0100 |
commit | ebe0608ada392a4c7fa2762b0995e80891350eb7 (patch) | |
tree | 6932a86db29fa3e727d617c48a3262e63fa7950d /nixos/modules/services | |
parent | dd6e0ab1cff3e5e7f441c6699b42014b7865f09b (diff) |
nixos/openconnect: fix null cases for user and passwordFile options
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/networking/openconnect.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/openconnect.nix b/nixos/modules/services/networking/openconnect.nix index 469f0a3bc3bb6..4676b1733af68 100644 --- a/nixos/modules/services/networking/openconnect.nix +++ b/nixos/modules/services/networking/openconnect.nix @@ -32,6 +32,7 @@ let description = lib.mdDoc "Username to authenticate with."; example = "example-user"; type = types.nullOr types.str; + default = null; }; # Note: It does not make sense to provide a way to declaratively @@ -108,7 +109,7 @@ let ExecStart = "${openconnect}/bin/openconnect --config=${ generateConfig name icfg } ${icfg.gateway}"; - StandardInput = "file:${icfg.passwordFile}"; + StandardInput = lib.mkIf (icfg.passwordFile != null) "file:${icfg.passwordFile}"; ProtectHome = true; }; |