mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
nginx/acme: fix certs
This commit is contained in:
parent
cbd76b3e44
commit
296a6f9af1
1 changed files with 23 additions and 18 deletions
|
|
@ -10,16 +10,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
local.nginx.defaultVhosts =
|
local.nginx.defaultVhosts = builtins.mapAttrs (_: v: {
|
||||||
{
|
|
||||||
"_" = {
|
|
||||||
default = true;
|
|
||||||
locations."/".return = "404";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// (builtins.mapAttrs (_: v: {
|
|
||||||
locations."/".proxyPass = v;
|
locations."/".proxyPass = v;
|
||||||
}) config.local.nginx.proxyVhosts);
|
}) config.local.nginx.proxyVhosts;
|
||||||
|
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
gerg_ssl_key.owner = config.services.nginx.user;
|
gerg_ssl_key.owner = config.services.nginx.user;
|
||||||
|
|
@ -31,6 +24,7 @@
|
||||||
certs."gerg-l.com" = {
|
certs."gerg-l.com" = {
|
||||||
email = "GregLeyda@proton.me";
|
email = "GregLeyda@proton.me";
|
||||||
webroot = "/var/lib/acme/acme-challenge";
|
webroot = "/var/lib/acme/acme-challenge";
|
||||||
|
extraDomainNames = builtins.attrNames config.local.nginx.defaultVhosts;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -47,14 +41,25 @@
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
# For immich
|
# For immich
|
||||||
clientMaxBodySize = "50000M";
|
clientMaxBodySize = "50000M";
|
||||||
virtualHosts = builtins.mapAttrs (
|
virtualHosts =
|
||||||
|
builtins.mapAttrs
|
||||||
|
(
|
||||||
_: v:
|
_: v:
|
||||||
{
|
{
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = "gerg-l.com";
|
useACMEHost = "gerg-l.com";
|
||||||
}
|
}
|
||||||
// v
|
// v
|
||||||
) config.local.nginx.defaultVhosts;
|
)
|
||||||
|
(
|
||||||
|
config.local.nginx.defaultVhosts
|
||||||
|
// {
|
||||||
|
"_" = {
|
||||||
|
default = true;
|
||||||
|
locations."/".return = "404";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
80
|
80
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue