mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
nixos/initrd-ssh: set KexAlgorithms/Ciphers/MACs only if non-null
Prior to this commit, if services.openssh.settings.Macs is null, then initrd-ssh.nix would fail to build. Same for KexAlgorithms and Ciphers. Noticed by @SuperSandro2000: https://github.com/NixOS/nixpkgs/pull/316934#issuecomment-2149659873
This commit is contained in:
parent
a9e4bf3fc1
commit
54332f47ce
@ -150,9 +150,13 @@ in
|
||||
HostKey ${initrdKeyPath path}
|
||||
'')}
|
||||
|
||||
KexAlgorithms ${concatStringsSep "," sshdCfg.settings.KexAlgorithms}
|
||||
Ciphers ${concatStringsSep "," sshdCfg.settings.Ciphers}
|
||||
MACs ${concatStringsSep "," sshdCfg.settings.Macs}
|
||||
'' + lib.optionalString (sshdCfg.settings.KexAlgorithms != null) ''
|
||||
KexAlgorithms ${concatStringsSep "," sshdCfg.settings.KexAlgorithms}
|
||||
'' + lib.optionalString (sshdCfg.settings.Ciphers != null) ''
|
||||
Ciphers ${concatStringsSep "," sshdCfg.settings.Ciphers}
|
||||
'' + lib.optionalString (sshdCfg.settings.Macs != null) ''
|
||||
MACs ${concatStringsSep "," sshdCfg.settings.Macs}
|
||||
'' + ''
|
||||
|
||||
LogLevel ${sshdCfg.settings.LogLevel}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user