diff --git a/hosts/bekkalokk/configuration.nix b/hosts/bekkalokk/configuration.nix index f8971a68..4c9da34d 100644 --- a/hosts/bekkalokk/configuration.nix +++ b/hosts/bekkalokk/configuration.nix @@ -16,6 +16,7 @@ ./services/vaultwarden.nix ./services/webmail ./services/website + ./services/well-known ]; sops.defaultSopsFile = ../../secrets/bekkalokk/bekkalokk.yaml; diff --git a/hosts/bekkalokk/services/website/default.nix b/hosts/bekkalokk/services/website/default.nix index 0689603c..488f100d 100644 --- a/hosts/bekkalokk/services/website/default.nix +++ b/hosts/bekkalokk/services/website/default.nix @@ -116,16 +116,6 @@ in { "/drift".return = "301 https://wiki.pvv.ntnu.no/wiki/Drift"; "/diverse/abuse.php".return = "301 https://wiki.pvv.ntnu.no/wiki/CERT/Abuse"; "/nerds/".return = "301 https://wiki.pvv.ntnu.no/wiki/Nerdepizza"; - - # Proxy the matrix well-known files - # Host has be set before proxy_pass - # The header must be set so nginx on the other side routes it to the right place - "^~ /.well-known/matrix/" = { - extraConfig = '' - proxy_set_header Host matrix.pvv.ntnu.no; - proxy_pass https://matrix.pvv.ntnu.no/.well-known/matrix/; - ''; - }; }; }; } diff --git a/hosts/bekkalokk/services/well-known/default.nix b/hosts/bekkalokk/services/well-known/default.nix new file mode 100644 index 00000000..a826c2da --- /dev/null +++ b/hosts/bekkalokk/services/well-known/default.nix @@ -0,0 +1,18 @@ +{ ... }: +{ + services.nginx.virtualHosts."www.pvv.ntnu.no".locations = { + "^~ /.well-known/" = { + alias = (toString ./root) + "/"; + }; + + # Proxy the matrix well-known files + # Host has be set before proxy_pass + # The header must be set so nginx on the other side routes it to the right place + "^~ /.well-known/matrix/" = { + extraConfig = '' + proxy_set_header Host matrix.pvv.ntnu.no; + proxy_pass https://matrix.pvv.ntnu.no/.well-known/matrix/; + ''; + }; + }; +} diff --git a/hosts/bekkalokk/services/well-known/root/autoconfig/mail/config-v1.1.xml b/hosts/bekkalokk/services/well-known/root/autoconfig/mail/config-v1.1.xml new file mode 100644 index 00000000..e3dbadc1 --- /dev/null +++ b/hosts/bekkalokk/services/well-known/root/autoconfig/mail/config-v1.1.xml @@ -0,0 +1,31 @@ + + + + pvv.ntnu.no + pvv.org + + Programvareverkstedet + + + imap.pvv.ntnu.no + 993 + SSL + %EMAILLOCALPART% + password-cleartext + + + + smtp.pvv.ntnu.no + 587 + STARTTLS + %EMAILLOCALPART% + password-cleartext + true + + + + Setup programvareverkstedet email user with IMAP or POP3 + Sett opp programvareverkstedet email bruker med IMAP eller POP3 + + + diff --git a/hosts/bekkalokk/services/well-known/root/security.txt b/hosts/bekkalokk/services/well-known/root/security.txt new file mode 100644 index 00000000..6d47083d --- /dev/null +++ b/hosts/bekkalokk/services/well-known/root/security.txt @@ -0,0 +1,12 @@ +Contact: mailto:drift@pvv.ntnu.no +Contact: mailto:cert@pvv.ntnu.no +# drift@pvv.ntnu.no is read by more people and have a quicker reaction time, +# but cert@pvv.ntnu.no can be used for more severe issues. + +Preferred-Languages: no, en + +Expires: 2032-12-31T23:59:59.000Z +# This file was last updated 2024-09-14. + +# You can find a wikipage for our security policies at: +# https://wiki.pvv.ntnu.no/wiki/CERT