modules: services: grocy: fix SSL configuration
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bruno BELANYI 2022-07-28 18:26:02 +02:00
parent b965ee15e5
commit 135349c882

View file

@ -2,6 +2,7 @@
{ config, lib, ... }:
let
cfg = config.my.services.grocy;
grocyDomain = "grocy.${config.networking.domain}";
in
{
options.my.services.grocy = with lib; {
@ -13,10 +14,11 @@ in
enable = true;
# The service sets up the reverse proxy automatically
hostName = "grocy.${config.networking.domain}";
hostName = grocyDomain;
# Configure SSL by hand
nginx = {
enableSSL = true;
enableSSL = false;
};
settings = {
@ -29,5 +31,10 @@ in
};
};
};
services.nginx.virtualHosts."${grocyDomain}" = {
forceSSL = true;
useACMEHost = config.networking.domain;
};
};
}