optionsDoc is stack limit blegh

This commit is contained in:
Shelvacu
2025-07-21 18:24:45 -07:00
committed by Shelvacu on nix-on-droid
parent fb9a738483
commit ca7d074438
2 changed files with 24 additions and 0 deletions

View File

@@ -477,6 +477,9 @@
unstable = true;
minimal = true;
};
optionsDocNixOnDroid = (pkgs.nixosOptionsDoc {
inherit (self.nixOnDroidConfigurations.default) options;
}).optionsCommonMark;
sopsConfig = plain.config.vacu.sopsConfigFile;
sourceTree = plain.config.vacu.sourceTree;
units = plain.config.vacu.units.finalPackage;

View File

@@ -532,6 +532,27 @@ in
'')}
'';
vacu.packages = [ (pkgs.writeScriptBin "run-sshd" ''
${lib.flip lib.concatMapStrings cfg.hostKeys (k: ''
if ! [ -s "${k.path}" ]; then
if ! [ -h "${k.path}" ]; then
rm -f "${k.path}"
fi
mkdir -p "$(dirname '${k.path}')"
chmod 0755 "$(dirname '${k.path}')"
ssh-keygen \
-t "${k.type}" \
${lib.optionalString (k ? bits) "-b ${toString k.bits}"} \
${lib.optionalString (k ? rounds) "-a ${toString k.rounds}"} \
${lib.optionalString (k ? comment) "-C '${k.comment}'"} \
${lib.optionalString (k ? openSSHFormat && k.openSSHFormat) "-o"} \
-f "${k.path}" \
-N ""
fi
'')}
exec ${cfg.package}/bin/sshd -D -f /etc/ssh/sshd_config "$@"
'') ];
vacu.checks = [
(pkgs.runCommand "check-sshd-config"
{