diff options
| -rw-r--r-- | configuration.nix | 1 | ||||
| -rw-r--r-- | nix/linkding.nix | 17 | ||||
| -rw-r--r-- | nix/web.nix | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/configuration.nix b/configuration.nix index 9477c6f..2f6b4db 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,6 +4,7 @@ ./nix/hardware-configuration.nix ./nix/minecraft.nix ./nix/options.nix + ./nix/linkding.nix ./nix/ssh.nix ./nix/web.nix ]; 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 = { |