diff --git a/machines/Ophanim/options.nix b/machines/Ophanim/options.nix index 3a6269e..cea24e2 100644 --- a/machines/Ophanim/options.nix +++ b/machines/Ophanim/options.nix @@ -46,6 +46,7 @@ in "nextcloud" "nginx" "openssh" + "tt-rss" ]; vHosts = let @@ -74,6 +75,10 @@ in domain = "food.${base}"; service = "tandoor"; } + { + domain = "feed.${base}"; + service = "tt-rss"; + } ]; firewall = { enable = true; diff --git a/services/nginx_vHosts/tt-rss.nix b/services/nginx_vHosts/tt-rss.nix new file mode 100644 index 0000000..7dc596b --- /dev/null +++ b/services/nginx_vHosts/tt-rss.nix @@ -0,0 +1,15 @@ +{ + options, + config, + lib, + pkgs, + ... +}: +with lib; +if config.services.tt-rss.enable then + { + enableACME = true; + forceSSL = true; + } +else + { } diff --git a/services/tt-rss.nix b/services/tt-rss.nix new file mode 100644 index 0000000..62384f2 --- /dev/null +++ b/services/tt-rss.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + ... +}: +with lib; +mkIf (elem "tt-rss" config.machine.services) ({ + services.tt-rss = + let + fqdn = ((findFirst (s: s.service == "tt-rss") { domain = null; } config.machine.vHosts)).domain; + in + { + enable = true; + registration.enable = false; + selfUrlPath = "https://${fqdn}"; + virtualHost = fqdn; + database = { + type = "mysql"; + }; + }; +})