keep dropbear host keys in /persist if it exists
This commit is contained in:
parent
f249c12bec
commit
a48d51ffdc
2 changed files with 6 additions and 4 deletions
|
@ -149,12 +149,14 @@ in rec {
|
|||
run = "${pkgs.chrony}/bin/chronyd -f ${config} -d";
|
||||
};
|
||||
|
||||
|
||||
services.sshd = longrun {
|
||||
name = "sshd";
|
||||
run = ''
|
||||
mkdir -p /run/dropbear
|
||||
${dropbear}/bin/dropbear -E -P /run/dropbear.pid -R -F
|
||||
if test -d /persist; then
|
||||
mkdir -p /persist/secrets/dropbear
|
||||
ln -s /persist/secrets/dropbear /run
|
||||
fi
|
||||
${dropbear}/bin/dropbear -E -R -P /run/dropbear.pid -F
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ in
|
|||
in runCommand "make-jffs2" {
|
||||
depsBuildBuild = [ mtdutils ];
|
||||
} ''
|
||||
mkdir -p $TMPDIR/empty/nix/store/
|
||||
mkdir -p $TMPDIR/empty/nix/store/ $TMPDIR/empty/secrets
|
||||
cp ${systemConfiguration}/bin/activate $TMPDIR/empty/activate
|
||||
ln -s ${pkgs.s6-init-bin}/bin/init $TMPDIR/empty/init
|
||||
grafts=$(sed < ${systemConfiguration}/etc/nix-store-paths 's/^\(.*\)$/--graft \1:\1/g')
|
||||
|
|
Loading…
Reference in a new issue