add imports
This commit is contained in:
parent
24e87ee6e1
commit
a7dc96e04c
|
@ -275,4 +275,11 @@ in {
|
||||||
};
|
};
|
||||||
users.groups.piped = {};
|
users.groups.piped = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./backend.nix
|
||||||
|
./frontend.nix
|
||||||
|
./proxy.nix
|
||||||
|
./nginx.nix
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,12 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib; let
|
inherit (lib.modules) mkIf;
|
||||||
|
|
||||||
cfg = config.services.piped;
|
cfg = config.services.piped;
|
||||||
frontend-package =
|
|
||||||
|
frontendPackage =
|
||||||
pkgs.piped-frontend.override {backendDomain = cfg.backendDomain;};
|
pkgs.piped-frontend.override {backendDomain = cfg.backendDomain;};
|
||||||
in {
|
in {
|
||||||
config = mkIf (cfg.enable && !cfg.disableFrontend && !cfg.disableNginx) {
|
config = mkIf (cfg.enable && !cfg.disableFrontend && !cfg.disableNginx) {
|
||||||
|
@ -15,7 +17,7 @@ in {
|
||||||
forceSSL = cfg.nginxForceSSL;
|
forceSSL = cfg.nginxForceSSL;
|
||||||
enableACME = cfg.nginxEnableACME;
|
enableACME = cfg.nginxEnableACME;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
root = "${frontend-package}/share/piped-frontend";
|
root = "${frontendPackage}/share/piped-frontend";
|
||||||
index = "index.html index.htm";
|
index = "index.html index.htm";
|
||||||
};
|
};
|
||||||
# I have no idea why try_files for Single Page Apps doesn't work here
|
# I have no idea why try_files for Single Page Apps doesn't work here
|
||||||
|
|
Loading…
Reference in a new issue