17 lines
412 B
Nix
17 lines
412 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
with lib;
|
||
|
let
|
||
|
cfg = config.services.piped;
|
||
|
frontend-package =
|
||
|
(pkgs.piped-frontend.override { backendDomain = cfg.backend_domain; });
|
||
|
|
||
|
in {
|
||
|
config = (lib.mkIf cfg.enable) {
|
||
|
services.nginx.virtualHosts."${cfg.frontend_domain}" = {
|
||
|
forceSSL = true;
|
||
|
enableACME = true;
|
||
|
locations."/" = { root = "${frontend-package}/share/piped-frontend"; };
|
||
|
};
|
||
|
};
|
||
|
}
|