fix: certbot not reload nginx
This commit is contained in:
parent
c24da9bea1
commit
f5ba45b20c
4 changed files with 22 additions and 7 deletions
|
|
@ -50,6 +50,10 @@ in
|
||||||
configureRedis = true;
|
configureRedis = true;
|
||||||
hostName = "nextcloud.net.dn";
|
hostName = "nextcloud.net.dn";
|
||||||
https = true;
|
https = true;
|
||||||
|
phpExtraExtensions =
|
||||||
|
all: with all; [
|
||||||
|
imagick
|
||||||
|
];
|
||||||
|
|
||||||
extraApps = {
|
extraApps = {
|
||||||
inherit (config.services.nextcloud.package.packages.apps)
|
inherit (config.services.nextcloud.package.packages.apps)
|
||||||
|
|
@ -59,12 +63,6 @@ in
|
||||||
tasks
|
tasks
|
||||||
;
|
;
|
||||||
|
|
||||||
memories = pkgs.fetchNextcloudApp {
|
|
||||||
sha256 = "sha256-BfxJDCGsiRJrZWkNJSQF3rSFm/G3zzQn7C6DCETSzw4=";
|
|
||||||
url = "https://github.com/pulsejet/memories/releases/download/v7.5.2/memories.tar.gz";
|
|
||||||
license = "agpl3Plus";
|
|
||||||
};
|
|
||||||
|
|
||||||
passwords =
|
passwords =
|
||||||
(pkgs.fetchNextcloudApp {
|
(pkgs.fetchNextcloudApp {
|
||||||
sha256 = "sha256-Nu6WViFawQWby9CEEezAwoBNdp7O5O8a9IhDp/me/E0=";
|
sha256 = "sha256-Nu6WViFawQWby9CEEezAwoBNdp7O5O8a9IhDp/me/E0=";
|
||||||
|
|
@ -90,6 +88,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
log_type = "file";
|
||||||
enabledPreviewProviders = [
|
enabledPreviewProviders = [
|
||||||
"OC\\Preview\\BMP"
|
"OC\\Preview\\BMP"
|
||||||
"OC\\Preview\\GIF"
|
"OC\\Preview\\GIF"
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,6 @@
|
||||||
{
|
{
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
enableReload = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,11 @@ let
|
||||||
publicKey = "oCRNCyg0bw6W6W87XQ4pIUW+WFi/bx9MG4cIwE23GxI=";
|
publicKey = "oCRNCyg0bw6W6W87XQ4pIUW+WFi/bx9MG4cIwE23GxI=";
|
||||||
allowedIPs = [ "10.0.0.144/32" ];
|
allowedIPs = [ "10.0.0.144/32" ];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
dns = "rasp";
|
||||||
|
publicKey = "z+2d+4FhSClGlSiAtaGnTgU6utxElfdRqiwPpCJFRn8=";
|
||||||
|
allowedIPs = [ "10.0.0.145/32" ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
dnsRecords =
|
dnsRecords =
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
"nginx.service"
|
"nginx.service"
|
||||||
"network.target"
|
"network.target"
|
||||||
];
|
];
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
environment = {
|
environment = {
|
||||||
"REQUESTS_CA_BUNDLE" = ../extra/ca.crt;
|
"REQUESTS_CA_BUNDLE" = ../extra/ca.crt;
|
||||||
};
|
};
|
||||||
|
|
@ -26,5 +25,16 @@
|
||||||
ExecStart = ''${pkgs.certbot}/bin/certbot renew'';
|
ExecStart = ''${pkgs.certbot}/bin/certbot renew'';
|
||||||
ExecStartPost = "${pkgs.busybox}/bin/chown nginx:nginx -R /etc/letsencrypt";
|
ExecStartPost = "${pkgs.busybox}/bin/chown nginx:nginx -R /etc/letsencrypt";
|
||||||
};
|
};
|
||||||
|
unitConfig = {
|
||||||
|
OnSuccess = "nginx-reload-after-certbot.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services."nginx-reload-after-certbot" = {
|
||||||
|
serviceConfig = {
|
||||||
|
User = "nginx";
|
||||||
|
# This config file path refers to "services.nginx.enableReload"
|
||||||
|
ExecStart = ''${pkgs.nginx}/bin/nginx -s reload -c /etc/nginx/nginx.conf'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue