Automate certificate path injection in AdGuard Home config
This commit is contained in:
parent
223f716b85
commit
deedd00762
1 changed files with 5 additions and 1 deletions
|
|
@ -145,7 +145,11 @@ in
|
|||
serviceConfig.SystemCallFilter = lib.mkForce []; # Allow yq-go to run its syscalls
|
||||
preStart = lib.mkAfter ''
|
||||
if [ -f /var/lib/private/AdGuardHome/AdGuardHome.yaml ]; then
|
||||
${pkgs.yq-go}/bin/yq -i '.filters = load("/run/adguardhome_filters.json").filters' /var/lib/private/AdGuardHome/AdGuardHome.yaml
|
||||
${pkgs.yq-go}/bin/yq -i '
|
||||
.filters = load("/run/adguardhome_filters.json").filters |
|
||||
.tls.certificate_path = "/var/lib/acme/${cfg.domain}/fullchain.pem" |
|
||||
.tls.private_key_path = "/var/lib/acme/${cfg.domain}/key.pem"
|
||||
' /var/lib/private/AdGuardHome/AdGuardHome.yaml
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue