From 7428d690a6df382444c15683377e105456f72cab Mon Sep 17 00:00:00 2001 From: Soispha Date: Fri, 18 Aug 2023 14:12:24 +0200 Subject: Feat(system/services/libreddit): Init --- system/services/libreddit/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 system/services/libreddit/default.nix (limited to 'system/services/libreddit') diff --git a/system/services/libreddit/default.nix b/system/services/libreddit/default.nix new file mode 100644 index 0000000..e52507f --- /dev/null +++ b/system/services/libreddit/default.nix @@ -0,0 +1,7 @@ +{...}: { + services.libreddit = { + enable = true; + address = "libreddit.vhack.eu"; + openFirewall = true; + }; +} -- cgit 1.4.1 From 097d566da1b3fe4092d8daa38034cf9b4c64556f Mon Sep 17 00:00:00 2001 From: Soispha Date: Fri, 18 Aug 2023 14:19:12 +0200 Subject: Fix(system/services/libreddit): Actually proxy services via nginx --- system/services/libreddit/default.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'system/services/libreddit') diff --git a/system/services/libreddit/default.nix b/system/services/libreddit/default.nix index e52507f..581445c 100644 --- a/system/services/libreddit/default.nix +++ b/system/services/libreddit/default.nix @@ -1,7 +1,23 @@ -{...}: { +{ + config, + lib, + ... +}: let + domain = "libreddit.vhack.eu"; +in { services.libreddit = { enable = true; - address = "libreddit.vhack.eu"; + address = "127.0.0.1"; openFirewall = true; }; + + services.nginx = { + enable = true; + virtualHosts.${domain} = { + locations."/".proxyPass = "http://127.0.0.1:${toString config.services.libreddit.port}"; + + enableACME = lib.mkDefault true; + forceSSL = lib.mkDefault true; + }; + }; } -- cgit 1.4.1 From f0a98522ac1d46c40d7337d34cd73b115512127d Mon Sep 17 00:00:00 2001 From: Soispha Date: Fri, 18 Aug 2023 14:33:14 +0200 Subject: Fix(system/services/libreddit): Don't open firewall --- system/services/libreddit/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/services/libreddit') diff --git a/system/services/libreddit/default.nix b/system/services/libreddit/default.nix index 581445c..e4ab893 100644 --- a/system/services/libreddit/default.nix +++ b/system/services/libreddit/default.nix @@ -8,7 +8,7 @@ in { services.libreddit = { enable = true; address = "127.0.0.1"; - openFirewall = true; + openFirewall = false; }; services.nginx = { -- cgit 1.4.1