diff options
Diffstat (limited to 'sys/web/sites/portal.nix')
| -rw-r--r-- | sys/web/sites/portal.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/web/sites/portal.nix b/sys/web/sites/portal.nix new file mode 100644 index 0000000..e46a9b1 --- /dev/null +++ b/sys/web/sites/portal.nix @@ -0,0 +1,23 @@ +{ config, lib, ... }: +with lib; let + cfg = config.local.web.sites.portal; + inherit (config.local) domains; +in +{ + options.local.web.sites.portal = { + enable = mkEnableOption "public non-fqdn portal"; + }; + + config = mkIf cfg.enable { + local.web = { + enable = mkDefault true; + ownedCerts = [ "host" ]; + }; + + services.nginx.virtualHosts.${domains.host.www} = { + forceSSL = true; + useACMEHost = domains.host.main; + serverAliases = [ domains.host.main ]; + }; + }; +} |
