@@ -89,9 +89,6 @@ in
8989
9090 config = mkIf (config.boot.initrd.network.enable && cfg.enable) {
9191 assertions = [
92− { assertion = cfg.hostRSAKey != null || cfg.hostDSSKey != null || cfg.hostECDSAKey != null;
93− message = "You should specify at least one host key for initrd SSH";
94− }
9592 { assertion = cfg.authorizedKeys != [];
9693 message = "You should specify at least one authorized key for initrd SSH";
9794 }
@@ -121,7 +118,7 @@ in
121118 echo ${escapeShellArg key} >> /root/.ssh/authorized_keys
122119 '') cfg.authorizedKeys)}
123120
124− dropbear -s -j -k -E -m -p ${toString cfg.port}
121+ dropbear -s -j -k -E -m -p ${toString cfg.port} ${optionalString (cfg.hostRSAKey == null && cfg.hostDSSKey == null && cfg.hostECDSAKey == null) "-R"}
125122 '';
126123
127124 boot.initrd.secrets =