feat: add vikunja
This commit is contained in:
commit
e38ffbedf4
8 changed files with 145 additions and 89 deletions
|
|
@ -1,91 +1,7 @@
|
|||
let
|
||||
net = import ./network.nix;
|
||||
services = import ./services.nix;
|
||||
web = import ../intermediate/web.nix;
|
||||
local = import ./endpoints/local.nix;
|
||||
web = import ./endpoints/web.nix;
|
||||
matrix = import ./endpoints/matrix.nix;
|
||||
vikunja = import ./endpoints/vikunja.nix;
|
||||
in
|
||||
[
|
||||
{
|
||||
type = "web";
|
||||
domain = net.devices.remote_proxy.domain;
|
||||
endpoint = "/";
|
||||
force_ssl = true;
|
||||
port = 443;
|
||||
content = web.storePayloads.home;
|
||||
}
|
||||
{
|
||||
type = "proxy";
|
||||
domain = net.devices.remote_proxy.domain;
|
||||
endpoint = "/_matrix/";
|
||||
force_ssl = true;
|
||||
port = 443;
|
||||
content = {
|
||||
type = "service";
|
||||
ip = net.devices.pi.ip;
|
||||
port = services.continuwuity.port;
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "proxy";
|
||||
domain = net.devices.remote_proxy.domain;
|
||||
endpoint = "/_matrix/";
|
||||
force_ssl = true;
|
||||
port = 8448;
|
||||
content = {
|
||||
type = "service";
|
||||
ip = net.devices.pi.ip;
|
||||
port = services.continuwuity.port;
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "inline";
|
||||
domain = net.devices.remote_proxy.domain;
|
||||
endpoint = "/.well-known/matrix/server";
|
||||
force_ssl = true;
|
||||
port = 443;
|
||||
content = {
|
||||
contentType = "application/json";
|
||||
status = 200;
|
||||
body = ''{"m.server":"${net.devices.remote_proxy.domain}:443"}'';
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "inline";
|
||||
domain = net.devices.remote_proxy.domain;
|
||||
endpoint = "/.well-known/matrix/client";
|
||||
force_ssl = true;
|
||||
port = 443;
|
||||
content = {
|
||||
contentType = "application/json";
|
||||
status = 200;
|
||||
body = ''{"m.homeserver":{"base_url":"https://${net.devices.remote_proxy.domain}"}}'';
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "proxy";
|
||||
domain = "torrent.${net.local_domain}";
|
||||
endpoint = "/";
|
||||
force_ssl = false;
|
||||
port = 80;
|
||||
content = {
|
||||
type = "service";
|
||||
ip = net.devices.pi.ip;
|
||||
port = services.qbittorrent.port;
|
||||
proxyWebsockets = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "proxy";
|
||||
domain = "wiki.${net.local_domain}";
|
||||
endpoint = "/";
|
||||
force_ssl = false;
|
||||
port = 80;
|
||||
content = {
|
||||
type = "service";
|
||||
ip = net.devices.pi.ip;
|
||||
port = services.kiwix.port;
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
}
|
||||
]
|
||||
local ++ web ++ matrix ++ vikunja ++ []
|
||||
32
config/endpoints/local.nix
Normal file
32
config/endpoints/local.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
let
|
||||
net = import ../network.nix;
|
||||
services = import ../services.nix;
|
||||
in
|
||||
[
|
||||
{
|
||||
type = "proxy";
|
||||
domain = "torrent.${net.local_domain}";
|
||||
endpoint = "/";
|
||||
force_ssl = false;
|
||||
port = 80;
|
||||
content = {
|
||||
type = "service";
|
||||
ip = net.devices.pi.ip;
|
||||
port = services.qbittorrent.port;
|
||||
proxyWebsockets = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "proxy";
|
||||
domain = "wiki.${net.local_domain}";
|
||||
endpoint = "/";
|
||||
force_ssl = false;
|
||||
port = 80;
|
||||
content = {
|
||||
type = "service";
|
||||
ip = net.devices.pi.ip;
|
||||
port = services.kiwix.port;
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
}
|
||||
]
|
||||
56
config/endpoints/matrix.nix
Normal file
56
config/endpoints/matrix.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
let
|
||||
net = import ../network.nix;
|
||||
services = import ../services.nix;
|
||||
in
|
||||
[
|
||||
{
|
||||
type = "proxy";
|
||||
domain = net.devices.remote_proxy.domain;
|
||||
endpoint = "/_matrix/";
|
||||
force_ssl = true;
|
||||
port = 443;
|
||||
content = {
|
||||
type = "service";
|
||||
ip = net.devices.pi.ip;
|
||||
port = services.continuwuity.port;
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "proxy";
|
||||
domain = net.devices.remote_proxy.domain;
|
||||
endpoint = "/_matrix/";
|
||||
force_ssl = true;
|
||||
port = 8448;
|
||||
content = {
|
||||
type = "service";
|
||||
ip = net.devices.pi.ip;
|
||||
port = services.continuwuity.port;
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "inline";
|
||||
domain = net.devices.remote_proxy.domain;
|
||||
endpoint = "/.well-known/matrix/server";
|
||||
force_ssl = true;
|
||||
port = 443;
|
||||
content = {
|
||||
contentType = "application/json";
|
||||
status = 200;
|
||||
body = ''{"m.server":"${net.devices.remote_proxy.domain}:443"}'';
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "inline";
|
||||
domain = net.devices.remote_proxy.domain;
|
||||
endpoint = "/.well-known/matrix/client";
|
||||
force_ssl = true;
|
||||
port = 443;
|
||||
content = {
|
||||
contentType = "application/json";
|
||||
status = 200;
|
||||
body = ''{"m.homeserver":{"base_url":"https://${net.devices.remote_proxy.domain}"}}'';
|
||||
};
|
||||
}
|
||||
]
|
||||
19
config/endpoints/vikunja.nix
Normal file
19
config/endpoints/vikunja.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
let
|
||||
net = import ../network.nix;
|
||||
services = import ../services.nix;
|
||||
in
|
||||
[
|
||||
{
|
||||
type = "proxy";
|
||||
domain = "vikunja.${net.devices.remote_proxy.domain}";
|
||||
endpoint = "/";
|
||||
force_ssl = true;
|
||||
port = 443;
|
||||
content = {
|
||||
type = "service";
|
||||
ip = net.devices.pi.ip;
|
||||
port = services.vikunja.port;
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
}
|
||||
]
|
||||
14
config/endpoints/web.nix
Normal file
14
config/endpoints/web.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
let
|
||||
net = import ../network.nix;
|
||||
web = import ../../intermediate/web.nix;
|
||||
in
|
||||
[
|
||||
{
|
||||
type = "web";
|
||||
domain = net.devices.remote_proxy.domain;
|
||||
endpoint = "/";
|
||||
force_ssl = true;
|
||||
port = 443;
|
||||
content = web.storePayloads.home;
|
||||
}
|
||||
]
|
||||
|
|
@ -29,4 +29,8 @@ rec {
|
|||
trusted_servers = [ "matrix.org" ];
|
||||
};
|
||||
|
||||
vikunja = {
|
||||
port = 8081;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue