mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
Merge pull request #222080 from Stunkymonkey/nixos-optionalString
This commit is contained in:
commit
b83db86a9e
41 changed files with 89 additions and 95 deletions
|
@ -474,10 +474,10 @@ in
|
|||
mkdir -m 0755 -p "$(dirname '${k.path}')"
|
||||
ssh-keygen \
|
||||
-t "${k.type}" \
|
||||
${if k ? bits then "-b ${toString k.bits}" else ""} \
|
||||
${if k ? rounds then "-a ${toString k.rounds}" else ""} \
|
||||
${if k ? comment then "-C '${k.comment}'" else ""} \
|
||||
${if k ? openSSHFormat && k.openSSHFormat then "-o" else ""} \
|
||||
${optionalString (k ? bits) "-b ${toString k.bits}"} \
|
||||
${optionalString (k ? rounds) "-a ${toString k.rounds}"} \
|
||||
${optionalString (k ? comment) "-C '${k.comment}'"} \
|
||||
${optionalString (k ? openSSHFormat && k.openSSHFormat) "-o"} \
|
||||
-f "${k.path}" \
|
||||
-N ""
|
||||
fi
|
||||
|
@ -550,7 +550,7 @@ in
|
|||
'') cfg.ports}
|
||||
|
||||
${concatMapStrings ({ port, addr, ... }: ''
|
||||
ListenAddress ${addr}${if port != null then ":" + toString port else ""}
|
||||
ListenAddress ${addr}${optionalString (port != null) (":" + toString port)}
|
||||
'') cfg.listenAddresses}
|
||||
|
||||
${optionalString cfgc.setXAuthLocation ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue