modules: services: grocy: fix SSL configuration
This commit is contained in:
parent
58971246e7
commit
48495851ba
|
@ -2,6 +2,7 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.services.grocy;
|
cfg = config.my.services.grocy;
|
||||||
|
grocyDomain = "grocy.${config.networking.domain}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.services.grocy = with lib; {
|
options.my.services.grocy = with lib; {
|
||||||
|
@ -13,10 +14,11 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# The service sets up the reverse proxy automatically
|
# The service sets up the reverse proxy automatically
|
||||||
hostName = "grocy.${config.networking.domain}";
|
hostName = grocyDomain;
|
||||||
|
|
||||||
|
# Configure SSL by hand
|
||||||
nginx = {
|
nginx = {
|
||||||
enableSSL = true;
|
enableSSL = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -29,5 +31,10 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${grocyDomain}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
useACMEHost = config.networking.domain;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue