diff options
| author | makefu <github@syntax-fehler.de> | 2023-09-09 19:42:08 +0200 |
|---|---|---|
| committer | makefu <github@syntax-fehler.de> | 2023-09-09 19:42:08 +0200 |
| commit | 29d72c898d674d2c18fc0f4a76b5e623de0c3dfe (patch) | |
| tree | fc4b0695c986a1cda6f1fbbbcbe716e203c54fa3 /lass/2configs/codimd.nix | |
| parent | e157ffa72856e4378aa23b096b2efff233f3cb3d (diff) | |
| parent | 083229d0211096daec08673f743ccc45b1d8a0ac (diff) | |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lass/2configs/codimd.nix')
| -rw-r--r-- | lass/2configs/codimd.nix | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/lass/2configs/codimd.nix b/lass/2configs/codimd.nix deleted file mode 100644 index ccca49fac..000000000 --- a/lass/2configs/codimd.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ config, pkgs, lib, ... }: -with import <stockholm/lib>; -let - domain = "pad.lassul.us"; -in { - - # redirect legacy domain to new one - services.nginx.virtualHosts."codi.lassul.us" = { - enableACME = true; - addSSL = true; - locations."/".return = "301 https://${domain}\$request_uri"; - }; - - services.nginx.virtualHosts.${domain} = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "https://localhost:3091"; - proxyWebsockets = true; - }; - }; - - security.acme.certs.${domain}.group = "hedgecert"; - users.groups.hedgecert.members = [ "hedgedoc" "nginx" ]; - - security.dhparams = { - enable = true; - params.hedgedoc = {}; - }; - - systemd.services.hedgedoc.environment = { - CMD_COOKIE_POLICY = "none"; - CMD_CSP_ALLOW_FRAMING = "true"; - }; - services.hedgedoc = { - enable = true; - configuration.allowOrigin = [ domain ]; - settings = { - db = { - dialect = "sqlite"; - storage = "/var/lib/hedgedoc/db.hedgedoc.sqlite"; - }; - useCDN = false; - port = 3091; - domain = domain; - allowFreeURL = true; - - useSSL = true; - protocolUseSSL = true; - sslCAPath = [ "/etc/ssl/certs/ca-certificates.crt" ]; - sslCertPath = "/var/lib/acme/${domain}/cert.pem"; - sslKeyPath = "/var/lib/acme/${domain}/key.pem"; - dhParamPath = config.security.dhparams.params.hedgedoc.path; - - }; - }; -} - |
