diff options
| author | Alexander Kassouni <alex@kassouni.net> | 2026-10-23 14:37:14 -0700 |
|---|---|---|
| committer | Alexander Kassouni <alex@kassouni.net> | 2026-10-23 14:37:14 -0700 |
| commit | 58b8aa9e5b70fbeb748f013d87b8ac682f900a8f (patch) | |
| tree | a9d5e83c37c301c8f197d8bc8ee70aa4362b7b33 /nix | |
| parent | 7d7bb8f3e88aa32d57edfd20de182a95b5fb72be (diff) | |
linkding: serve bookmarks at links.kassouni.net
Add the linkding module behind an nginx reverse proxy with ACME TLS,
and enable recommendedProxySettings so proxied vhosts get sane headers.
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/linkding.nix | 17 | ||||
| -rw-r--r-- | nix/web.nix | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/nix/linkding.nix b/nix/linkding.nix new file mode 100644 index 0000000..744fe19 --- /dev/null +++ b/nix/linkding.nix @@ -0,0 +1,17 @@ +{ config, ... }: let + domain = "links.kassouni.net"; +in { + services.linkding = { + enable = true; + environmentFile = "/var/lib/linkding/creds.env"; + settings.LD_CSRF_TRUSTED_ORIGINS = "https://${domain}"; + }; + + services.nginx.virtualHosts.${domain} = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString config.services.linkding.port}"; + }; + }; +} diff --git a/nix/web.nix b/nix/web.nix index 0013d4f..82a0dfb 100644 --- a/nix/web.nix +++ b/nix/web.nix @@ -5,6 +5,7 @@ in { enable = true; recommendedGzipSettings = true; recommendedOptimisation = true; + recommendedProxySettings = true; recommendedTlsSettings = true; virtualHosts = { |