add imports
This commit is contained in:
parent
24e87ee6e1
commit
a7dc96e04c
|
@ -275,4 +275,11 @@ in {
|
|||
};
|
||||
users.groups.piped = {};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./backend.nix
|
||||
./frontend.nix
|
||||
./proxy.nix
|
||||
./nginx.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
|
||||
|
|
Loading…
Reference in a new issue