diff --git a/modules/core/postgres.nix b/modules/core/postgres.nix index 2342765..daf44ff 100644 --- a/modules/core/postgres.nix +++ b/modules/core/postgres.nix @@ -5,7 +5,6 @@ enable = true; location = "/var/lib/backup/postgresql"; databases = [ - "directus_ese" "course-management" "git" "grafana" diff --git a/modules/web/ese.nix b/modules/web/ese.nix index 93fc356..4763b4a 100644 --- a/modules/web/ese.nix +++ b/modules/web/ese.nix @@ -1,72 +1,9 @@ -{ config, pkgs, ... }: +{ config, ... }: let domain = "ese.${config.networking.domain}"; - cms-domain = "directus-ese.${config.networking.domain}"; in { - sops.secrets."directus_env" = { }; - environment.systemPackages = [ pkgs.nodejs_22 ]; - virtualisation.oci-containers = { - containers.directus-ese = { - image = "directus/directus:latest"; - volumes = [ - "/srv/web/directus-ese/uploads:/directus/uploads" - "/srv/web/directus-ese/database:/directus/database" - ]; - extraOptions = [ "--network=host" ]; - environment = { - "DB_CLIENT" = "pg"; - "DB_HOST" = "localhost"; - "DB_PORT" = "5432"; - "DB_DATABASE" = "directus_ese"; - "DB_USER" = "directus_ese"; - "PUBLIC_URL" = "https://directus-ese.ifsr.de"; - "AUTH_PROVIDERS" = "keycloak"; - "AUTH_KEYCLOAK_DRIVER" = "openid"; - "AUTH_KEYCLOAK_CLIENT_ID" = "directus-ese"; - "AUTH_KEYCLOAK_ISSUER_URL" = "https://sso.ifsr.de/realms/internal/.well-known/openid-configuration"; - "AUTH_KEYCLOAK_IDENTIFIER_KEY" = "email"; - "AUTH_KEYCLOAK_ALLOW_PUBLIC_REGISTRATION" = "true"; - "AUTH_KEYCLOAK_DEFAULT_ROLE_ID" = "a6b7a1b6-a6fa-442c-87fd-e37c2a16424b"; - }; - environmentFiles = [ - config.sops.secrets."directus_env".path - ]; - - }; - }; - services.postgresql = { - enable = true; - ensureUsers = [ - { - name = "directus_ese"; - ensureDBOwnership = true; - } - ]; - ensureDatabases = [ "directus_ese" ]; - }; - services.nginx = { - virtualHosts."${cms-domain}" = { - locations."/" = { - extraConfig = '' - if ($request_method = 'OPTIONS') { - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization'; - add_header 'Access-Control-Max-Age' 1728000; - add_header 'Content-Type' 'text/plain; charset=utf-8'; - add_header 'Content-Length' 0; - return 204; - } - - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization'; - ''; - proxyPass = "http://127.0.0.1:8055"; - }; - }; virtualHosts."${domain}" = { locations."= /" = { return = "301 /2024/"; diff --git a/secrets/quitte.yaml b/secrets/quitte.yaml index 67ab101..f913500 100644 --- a/secrets/quitte.yaml +++ b/secrets/quitte.yaml @@ -21,7 +21,6 @@ mediawiki: mautrix-telegram_env: ENC[AES256_GCM,data:FyMtJChtir8Ip8S7zlBSvKccjt+7Hl0StHzxmKO7VdwNNA650HHfni9o7akIY52+r86tvP3D/bqHaBZqkq61ZNICnFJuYIkROvt1035uej1cdjlHeCrZBttI2w3ZkkKT/RZq5BOLt52o/fnw5Jlt+3yr6Kzd5mvcz6a2e5V96kFjaib6mMdg/Y6axiXvOSeFOHCjs6Js+ab7MDe90KUM3aLtBezXx9YTeU7RiqEiZl21dxzPIwilj8bhEB0RRIb1,iv:1ojF2NyQfaZbKwlHQND7LEOLWT1SWCpGPQTm2+0Y+xo=,tag:RavBAv49Ldm4rH+2DDGstQ==,type:str] postfix_ldap_aliases: ENC[AES256_GCM,data:beJTXpJYlAz4vyv2rAyuMtU2gkwf4JNnsFAG0oKLWuKQZnX/EyqyGTFK7hOs12qye26H9Ysl5vP12iDyVXU4cyYmBOMSOiIS4opPVs7yjp/FH0u6DXHExzd8qs5vwa+D+c9j05kLVZ85EGneDma4ITNBjo/JMjyXCHB0e8EZTFyfR8+fq+qvuyOUmLBfJSO5BK96u370DJ7EmIPLDiCUSO2MCD86yfFEq5J++ljeuKLxUtisqFWDPNeNq3YGjz0EHUgcqqDwzLwEEXyvn5FEI00nR0qBgSBTSWRDrndo5O2k3JMfZWW9UhXXS4kPwCYEkQSM240cwLNV/Rb9XceH2wxzL8PcfTNiy2vd,iv:lb9u3ryu1+G95OIizX17ft+fGK2CA2xt9DhYhtKda1c=,tag:CsS2Q32AgAyS5eZ7Z/Kf8g==,type:str] vaultwarden_env: ENC[AES256_GCM,data:JFySiTHahlUFsM+FcuSJPnGYMijphrnZpFFdoNe7DYxWjIgPRWdfH9WC/a5GsK2xCJXllXAASHNxgkYRrdPw2KaCiUR/QhAjtUmyv2NsIBcMYStafDUEK9emddR+ACedScsgS0FtP8f3cz1enTBi+DkYgL8lMAoCw5p8vMRyE9mVOLpTUDOO7T4=,iv:992REuXzHAxxhy2BbeCGNhTZkn8eSi8N2RyBXqqy7U0=,tag:iP5AFQqzoR66AkTGfYAUZg==,type:str] -directus_env: ENC[AES256_GCM,data:Q8mQYpwsMbv8NHIzTjxlbS528uZoFkzB0WDZITiYdbq6Y5a+12IEuXXRU+/v7vonpSWFH0ROqfrGy5yd3VhTR2eFvg8OsnlanFnnF4DYIDVMWLEOf4XoOoh/9tYPqoPYFtvwYnlCZFaEky4BKdcIFuqSuqrV9GSabBRuNJ1RbPyRXA6Nwr25uWYr70/1iIEb1tfffqR1YfycZ1JW4kL7OcjxNb6CwoPQ00Z/0t3YYG5Rc9rj7qTc6qw=,iv:yswA2oUhllYoAflK4BbxUMlCWaEfrFi/6g1r6wWZxHA=,tag:36xbdXho+lqKQt9ZaqS/Mw==,type:str] strukturbot_env: ENC[AES256_GCM,data:klTFgdNvdMYA++GsmqEHdhklZ5JUreP2Lh+5E0mj5iH7F8Run6/gAdHBJpCWEe2Q3o6RdZduy+kCXzJWznkLbEASxgJNcAWdFq2CU4ov0Z6rGS6i/X376Y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2wYI7ntWdNwaAPoTu8OFw0kKW2+JsaNHeXQfGmWZfUtKWIJetnUn22SLAe86J71hFBveVlokehQ7Fcg0MFt2r9mlR0/eP1aWyrN54tyEv5uOekmKE00FN/8PpzgH7qasvRPuuXkotj1gazJYk7Tz0oO9OTM4M/yplrL8fLOwP75Uc5PGGVu3pHmwkfrjhh72V993Su0V3us4p+whv2ItZ/A4O0np9CSvFEJXOS4esCmsXLqr4BbBy2veoxnIiF3MEmEqbkMtgkslnVwM1RVNPCKESxFzu0oU5phyWn0a4JW46g5lx1tm/GWXlHQWa4=,iv:x3+PuXdpZ+SEuqHo7icQVyzGEI3IdEyYjjOFkKbzq2o=,tag:pWoe2PC/tEODmz7o6wcVPQ==,type:str] @@ -52,8 +51,8 @@ sops: c2lzVGV6WnVQT1pOTTVwRUxlMWZobWsK0CrDl2ELoYOTrMt3uN3mgBSyaYqOQY4I vBK12PV9FR9GFpKN4kGB03PZ0gV0N1zlcCHpnPCUuHwbCvvF2+vCag== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-09-04T09:59:31Z" - mac: ENC[AES256_GCM,data:aJhc+EdQKG1uYktc4RqNbxzYTKkQefPYNWmjsZbLJJPO/DewtZrDwuEt8BipLDQaA02j34cSIj0r0STfRKz7OH/K9VMtrdlOUqi5Zik8OZX2u4A9r/iIWFr0i8eMmlaoYk/qR0llwkd8hA4kxuSfmdPzDmxpIbqwqgIUtsi0wb8=,iv:cFwUzkjKU3JN2us9whRg95oPks5+jm1sL3Q2RKLif6Y=,tag:zY2OZF8b7bthg+yIzmyDeA==,type:str] + lastmodified: "2024-09-26T18:10:46Z" + mac: ENC[AES256_GCM,data:D2qTNh+PfSu3ZjoIv/8qS+S6+Rjqa9Xpwdm+Fj90ibimU3YW5FfrBrNb2psF1nterLUtSdCWPt02m4UFwsH4geizsrVTuv9mWtrCC2DhC8kzV+tFG4OvBCCIM/F7NWM6BElm+etKtvWULRxpoqu4TTk3mQzSQ49SxlaA/NbeVr8=,iv:p0HLBsU0cR2Yt9dF4R3lAIcenScHn47IN4zy/J51i6A=,tag:zuP6Zp8Q89spkvcNQ8kkrQ==,type:str] pgp: - created_at: "2024-02-29T15:23:23Z" enc: |-