diff --git a/hosts/nachtigall/apps/libreddit.nix b/hosts/nachtigall/apps/libreddit.nix new file mode 100644 index 00000000..f9521cc6 --- /dev/null +++ b/hosts/nachtigall/apps/libreddit.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + pkgs, + self, + ... +}: { + services.nginx.virtualHosts."libreddit.pub.solar" = { + enableACME = true; + forceSSL = true; + + locations."/" = { + proxyWebsockets = true; + extraConfig = '' + proxy_pass http://127.0.0.1:8082; + proxy_set_header Host $host; + ''; + }; + }; + + services.libreddit = { + enable = true; + openFirewall = false; + address = "127.0.0.1"; + port = "8082"; + }; +} diff --git a/hosts/nachtigall/default.nix b/hosts/nachtigall/default.nix index de927890..93f5f8b6 100644 --- a/hosts/nachtigall/default.nix +++ b/hosts/nachtigall/default.nix @@ -13,6 +13,7 @@ ./apps/collabora.nix ./apps/forgejo.nix ./apps/keycloak.nix + ./apps/libreddit.nix ./apps/mailman.nix ./apps/mastodon.nix ./apps/nextcloud.nix diff --git a/terraform/dns.tf b/terraform/dns.tf index 79200e13..ba1b4c57 100644 --- a/terraform/dns.tf +++ b/terraform/dns.tf @@ -66,6 +66,12 @@ resource "namecheap_domain_records" "pub-solar" { address = "nachtigall.pub.solar." ttl = 60 } + record { + hostname = "libreddit" + type = "CNAME" + address = "nachtigall.pub.solar." + ttl = 60 + } record { hostname = "@" type = "ALIAS"