mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
nixos/openconnect: fix null cases for user and passwordFile options
This commit is contained in:
parent
dd6e0ab1cf
commit
ebe0608ada
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user