From 306652ff73a3302c398ec6b3284c86a3257785ca Mon Sep 17 00:00:00 2001 From: Amanda Graven Date: Tue, 12 Apr 2022 15:38:07 +0200 Subject: [PATCH 1/2] Set up nitter on wind --- config/hosts/wind/services/nginx.nix | 5 +++++ config/hosts/wind/services/nitter.nix | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 config/hosts/wind/services/nitter.nix diff --git a/config/hosts/wind/services/nginx.nix b/config/hosts/wind/services/nginx.nix index e219049..5e0cf2f 100644 --- a/config/hosts/wind/services/nginx.nix +++ b/config/hosts/wind/services/nginx.nix @@ -29,6 +29,11 @@ forceSSL = true; locations."/".proxyPass = "http://unix:/run/gitea/gitea.sock:"; }; + "nitter.graven.dev" = { + useACMEHost = "graven.dev"; + forceSSL = true; + locations."/".proxyPass = "http://localhost:4992" + } "vault.graven.dev" = { forceSSL = true; useACMEHost = "graven.dev"; diff --git a/config/hosts/wind/services/nitter.nix b/config/hosts/wind/services/nitter.nix new file mode 100644 index 0000000..9bc7f40 --- /dev/null +++ b/config/hosts/wind/services/nitter.nix @@ -0,0 +1,11 @@ +{ config, ... }: +{ + services.nitter = { + enable = true; + server = { + port = 4992; + # Only save cookies on HTTPS + https = true; + } + } +} From eb43445854c5f2b83a1470609c7ded365427a09c Mon Sep 17 00:00:00 2001 From: Emelie Graven Date: Tue, 12 Apr 2022 16:07:17 +0200 Subject: [PATCH 2/2] Disable external access, delete nginx config --- config/hosts/wind/configuration.nix | 1 + config/hosts/wind/services/nginx.nix | 5 ----- config/hosts/wind/services/nitter.nix | 3 ++- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/config/hosts/wind/configuration.nix b/config/hosts/wind/configuration.nix index b909657..5d59f5f 100644 --- a/config/hosts/wind/configuration.nix +++ b/config/hosts/wind/configuration.nix @@ -8,6 +8,7 @@ ./services/acme.nix ./services/coturn.nix ./services/nginx.nix + ./services/nitter.nix ./services/postgres.nix ./services/synapse.nix ./services/ttrss.nix diff --git a/config/hosts/wind/services/nginx.nix b/config/hosts/wind/services/nginx.nix index 5e0cf2f..e219049 100644 --- a/config/hosts/wind/services/nginx.nix +++ b/config/hosts/wind/services/nginx.nix @@ -29,11 +29,6 @@ forceSSL = true; locations."/".proxyPass = "http://unix:/run/gitea/gitea.sock:"; }; - "nitter.graven.dev" = { - useACMEHost = "graven.dev"; - forceSSL = true; - locations."/".proxyPass = "http://localhost:4992" - } "vault.graven.dev" = { forceSSL = true; useACMEHost = "graven.dev"; diff --git a/config/hosts/wind/services/nitter.nix b/config/hosts/wind/services/nitter.nix index 9bc7f40..7c07e62 100644 --- a/config/hosts/wind/services/nitter.nix +++ b/config/hosts/wind/services/nitter.nix @@ -5,7 +5,8 @@ server = { port = 4992; # Only save cookies on HTTPS - https = true; + address = "127.0.0.1"; + } } }