diff options
Diffstat (limited to 'machines/renne/default.nix')
| -rw-r--r-- | machines/renne/default.nix | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/machines/renne/default.nix b/machines/renne/default.nix new file mode 100644 index 0000000..8473613 --- /dev/null +++ b/machines/renne/default.nix @@ -0,0 +1,109 @@ +{ me, machines, ... }: + +{ + imports = [ + ../../modules/common.nix + + ./hardware.nix + ./devices.nix + + ../../services/minecraft.nix + ]; + + foundation = { + www = { + enable = true; + + public = true; + tailnet = true; + }; + + monitoring = { + client.enable = true; + + services = [ + "base" + "tailnet" + "mel" + "shorest" + ]; + }; + }; + + services.nginx.virtualHosts = { + base.locations = { + "/stuff/" = { + alias = "/var/www/html/"; + }; + + # redirect to akkoma on lapin + "/.well-known/webfinger" = { + return = "301 https://soc.rnrd.eu$request_uri"; + }; + + # delegate matrix to subdomain `matrix.rnrd.eu` + "/.well-known/matrix/server" = { + return = "200 '{ \"m.server\": \"matrix.rnrd.eu:443\" }'"; + extraConfig = '' + default_type application/json; + ''; + }; + "/.well-known/matrix/client" = { + return = '' + 200 '{ + "m.homeserver": { + "base_url": "https://matrix.rnrd.eu/" + }, + "org.matrix.msc3575.proxy": { + "url": "https://matrix.rnrd.eu/" + } + }' + ''; + extraConfig = '' + default_type application/json; + add_header "Access-Control-Allow-Origin" *; + ''; + }; + }; + + "sho.rest" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:5000"; + }; + extraConfig = '' + access_log /var/log/nginx/shorest.access.log json_combined; + ''; + }; + + "mel.gg" = { + enableACME = true; + forceSSL = true; + root = "/srv/mel"; + extraConfig = '' + access_log /var/log/nginx/mel.access.log json_combined; + ''; + }; + + "catskill.dev" = { + enableACME = true; + forceSSL = true; + root = "/srv/catskill"; + extraConfig = '' + access_log /var/log/nginx/catskill.access.log json_combined; + ''; + }; + + "moth.run" = { + enableACME = true; + forceSSL = true; + root = "/srv/moth"; + extraConfig = '' + access_log /var/log/nginx/moth.access.log json_combined; + ''; + }; + }; + + system.stateVersion = "24.05"; +} |
