modules: services: use new nginx wrapper
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
And when not possible, document why. Note for the future: there is some repetition in some modules to configure the correct value of the subdomain, which I happen to know will line up correctly thanks to the nginx wrapper. A good way to refactor this in the future would involve avoiding this repetition, allowing use to query the correct domain in some way...
This commit is contained in:
parent
81e12969eb
commit
7032ddef37
19 changed files with 187 additions and 254 deletions
|
|
@ -2,8 +2,6 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.services.rss-bridge;
|
||||
domain = config.networking.domain;
|
||||
rss-bridgeDomain = "rss-bridge.${config.networking.domain}";
|
||||
in
|
||||
{
|
||||
options.my.services.rss-bridge = {
|
||||
|
|
@ -14,12 +12,13 @@ in
|
|||
services.rss-bridge = {
|
||||
enable = true;
|
||||
whitelist = [ "*" ]; # Whitelist all
|
||||
virtualHost = rss-bridgeDomain; # Setup virtual host
|
||||
virtualHost = "rss-bridge.${config.networking.domain}";
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${rss-bridgeDomain}" = {
|
||||
# The service above configures the domain, no need for my wrapper
|
||||
services.nginx.virtualHosts."rss-bridge.${config.networking.domain}" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = domain;
|
||||
useACMEHost = config.networking.domain;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue