more server stuff

This commit is contained in:
Till 2025-04-27 18:29:51 +02:00
parent 0d08c32077
commit bc5f851d3f
5 changed files with 63 additions and 11 deletions

View file

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
services.nginx.virtualHosts."fundkorb.ktiu.net" = {
addSSL = true;
enableACME = true;
root = "/var/www/fundkorb-button/html";
location."/" = {
basicAuth = "Fundkorb build trigger";
basicAuthFile = "/var/www/fundkorb-button/.htpasswd";
};
};
}

View file

@ -32,10 +32,13 @@ in {
enable = true;
virtualHosts = {
"ktiu.net" = {
addSSL = true;
forceSSL = true;
enableACME = true;
locations."/" = {
return = "418 'Ich bin eine Teekanne.'";
return = "200 'This domain used for e-mail hosting only.'";
extraConfig = ''
add_header Content-Type text/plain;
'';
};
};
"${config.networking.fqdn}" = {
@ -45,7 +48,8 @@ in {
root = "/var/lib/acme/.challenges";
};
locations."/" = {
return = "301 http://${config.networking.domain}";
# return = "301 http://${config.networking.domain}";
return = "404";
};
};
};

View file

@ -2,18 +2,17 @@
{
# services.outline = {
# enable = true;
# storage.storageType = "local";
# smtp = {
# host = "localhost";
# };
# };
services.outline = {
enable = true;
storage.storageType = "local";
# smtp = {
# host = "localhost";
# };
};
services.nginx.virtualHosts."outline.ktiu.net" = {
addSSL = true;
enableACME = true;
# root = "/var/www/myhost.org";
locations."/" = {
proxyPass = "http://127.0.0.1:3000";
extraConfig =

View file

@ -0,0 +1,34 @@
{ config, pkgs, ... }:
{
services.nginx.virtualHosts."kalender.ktiu.net" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:5232/";
extraConfig = ''
proxy_set_header X-Script-Name /;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Authorization;
'';
};
};
services.radicale = {
enable = true;
settings = {
server = {
hosts = [ "0.0.0.0:5232" "[::]:5232" ];
};
auth = {
type = "htpasswd";
htpasswd_filename = "/etc/radicale/users";
htpasswd_encryption = "bcrypt";
};
storage = {
filesystem_folder = "/var/lib/radicale/collections";
};
};
};
}