caddy
This commit is contained in:
parent
eb5691d342
commit
8f2268782b
|
@ -53,8 +53,6 @@
|
|||
inherit geoip2-tarball;
|
||||
};
|
||||
|
||||
e11sync-module = import ./modules/e11sync e11sync-backend;
|
||||
|
||||
e11sync-static = pkgs.callPackage ./pkgs/e11sync-static.nix {};
|
||||
|
||||
e11sync-frontend = pkgs.callPackage ./pkgs/e11sync-frontend.nix {
|
||||
|
@ -64,6 +62,10 @@
|
|||
e11sync-backend = pkgs.callPackage ./pkgs/e11sync-backend.nix {
|
||||
inherit geoip-mmdb e11sync-static;
|
||||
};
|
||||
|
||||
e11sync-module = import ./modules/e11sync {
|
||||
inherit e11sync-backend e11sync-frontend;
|
||||
};
|
||||
in {
|
||||
packages = {
|
||||
inherit geoip-mmdb;
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
e11sync-backend: {
|
||||
{
|
||||
e11sync-backend,
|
||||
e11sync-frontend,
|
||||
}: {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
|
@ -22,6 +25,7 @@ e11sync-backend: {
|
|||
type = path;
|
||||
default = "/var/lib/e11sync-backend/db.sqlite3";
|
||||
};
|
||||
vhost = lib.mkOption {type = str;};
|
||||
};
|
||||
|
||||
config = let
|
||||
|
@ -74,5 +78,8 @@ e11sync-backend: {
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."${cfg.vhost}".extraConfig =
|
||||
builtins.readFile "${e11sync-frontend}";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue