programs/ssh: use 'toKeyValue' for 'extraOptions'
A first step towards refactoring the module. Unfortunately the config is not consistent in using comma-separated values or repeated keys for lists, since the user can always add commas by themselves, we should default to repeated keys in the generator.
This commit is contained in:
parent
43173abcb4
commit
28741978a3
7 changed files with 19 additions and 1 deletions
|
|
@ -451,7 +451,13 @@ let
|
|||
++ map (f: " LocalForward" + addressPort f.bind + addressPort f.host) cf.localForwards
|
||||
++ map (f: " RemoteForward" + addressPort f.bind + addressPort f.host) cf.remoteForwards
|
||||
++ map (f: " DynamicForward" + addressPort f) cf.dynamicForwards
|
||||
++ mapAttrsToList (n: v: " ${n} ${v}") cf.extraOptions
|
||||
++ [
|
||||
(lib.generators.toKeyValue {
|
||||
mkKeyValue = lib.generators.mkKeyValueDefault { } " ";
|
||||
listsAsDuplicateKeys = true;
|
||||
indent = " ";
|
||||
} cf.extraOptions)
|
||||
]
|
||||
);
|
||||
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue