nix-config/modules/vikunja/default.nix

31 lines
598 B
Nix

{
config,
lib,
...
}: let
inherit (lib) mkIf;
cfg = config.conf.vikunja;
in
mkIf cfg.enable {
services.nginx.virtualHosts.${cfg.domain.full} = {
forceSSL = true;
useACMEHost = cfg.domain.base;
locations = {
"/" = {
proxyPass = "http://localhost:${toString cfg.port}";
};
};
};
services.vikunja = {
enable = true;
frontendScheme = "http";
frontendHostname = cfg.domain.full;
port = cfg.port;
settings = {
service = {
enableregistration = false;
};
};
};
}