aboutsummaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/linkding.nix17
-rw-r--r--nix/web.nix1
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 = {