From a7dc96e04c5d83f008a9d55fc00286d72d323d9d Mon Sep 17 00:00:00 2001 From: chaos Date: Fri, 8 Sep 2023 11:46:37 +0100 Subject: [PATCH] add imports --- module/default.nix | 7 +++++++ module/frontend.nix | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/module/default.nix b/module/default.nix index 709c2ec..59138d0 100644 --- a/module/default.nix +++ b/module/default.nix @@ -275,4 +275,11 @@ in { }; users.groups.piped = {}; }; + + imports = [ + ./backend.nix + ./frontend.nix + ./proxy.nix + ./nginx.nix + ]; } diff --git a/module/frontend.nix b/module/frontend.nix index e12975b..87171ee 100644 --- a/module/frontend.nix +++ b/module/frontend.nix @@ -3,10 +3,12 @@ lib, pkgs, ... -}: -with lib; let +}: let + inherit (lib.modules) mkIf; + cfg = config.services.piped; - frontend-package = + + frontendPackage = pkgs.piped-frontend.override {backendDomain = cfg.backendDomain;}; in { config = mkIf (cfg.enable && !cfg.disableFrontend && !cfg.disableNginx) { @@ -15,7 +17,7 @@ in { forceSSL = cfg.nginxForceSSL; enableACME = cfg.nginxEnableACME; locations."/" = { - root = "${frontend-package}/share/piped-frontend"; + root = "${frontendPackage}/share/piped-frontend"; index = "index.html index.htm"; }; # I have no idea why try_files for Single Page Apps doesn't work here