install openssh-client in dokuwiki container for gitbacked
This commit is contained in:
parent
75dd30ebba
commit
64bc4855b6
1 changed files with 24 additions and 1 deletions
|
|
@ -1,4 +1,20 @@
|
|||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
initOpenssh = pkgs.writeTextFile {
|
||||
name = "30-openssh";
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/bin/sh
|
||||
set -e
|
||||
command -v ssh >/dev/null 2>&1 || apk add --no-cache openssh-client
|
||||
if [ ! -f /config/.ssh/known_hosts ] || ! grep -q "^github.com " /config/.ssh/known_hosts; then
|
||||
mkdir -p /config/.ssh
|
||||
ssh-keyscan -t ed25519,rsa github.com >> /config/.ssh/known_hosts 2>/dev/null
|
||||
chmod 600 /config/.ssh/known_hosts
|
||||
fi
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
services.caddy.virtualHosts."wiki.ily.rs" = {
|
||||
extraConfig = ''
|
||||
|
|
@ -30,6 +46,13 @@
|
|||
ports = [ "127.0.0.1:8070:80" ];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.settings."10-dokuwiki"."/srv/dokuwiki/cont-init.d/30-openssh"."C+" = {
|
||||
argument = "${initOpenssh}";
|
||||
user = "100999";
|
||||
group = "100999";
|
||||
mode = "0755";
|
||||
};
|
||||
|
||||
# Workaround for NixOS/nixpkgs#410857 until backport of #475089 lands
|
||||
systemd.services.podman-dokuwiki.serviceConfig.Delegate = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue