nixfiles/hosts/hetzner-vm/modules/piped/frontend.nix

17 lines
410 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.piped;
frontend-package =
2022-12-03 14:45:31 +00:00
(pkgs.piped-frontend.override { backendDomain = cfg.backendDomain; });
in {
config = (lib.mkIf cfg.enable) {
2022-12-03 14:45:31 +00:00
services.nginx.virtualHosts."${cfg.frontendDomain}" = {
forceSSL = true;
enableACME = true;
locations."/" = { root = "${frontend-package}/share/piped-frontend"; };
};
};
}