tt-rss: init service

This commit is contained in:
Kevin Baensch 2024-11-21 13:05:30 +01:00
parent 35f22bbe00
commit aa081e8ebb
Signed by: derped
GPG key ID: C0F1D326C7626543
3 changed files with 41 additions and 0 deletions

View file

@ -46,6 +46,7 @@ in
"nextcloud" "nextcloud"
"nginx" "nginx"
"openssh" "openssh"
"tt-rss"
]; ];
vHosts = vHosts =
let let
@ -74,6 +75,10 @@ in
domain = "food.${base}"; domain = "food.${base}";
service = "tandoor"; service = "tandoor";
} }
{
domain = "feed.${base}";
service = "tt-rss";
}
]; ];
firewall = { firewall = {
enable = true; enable = true;

View file

@ -0,0 +1,15 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
if config.services.tt-rss.enable then
{
enableACME = true;
forceSSL = true;
}
else
{ }

21
services/tt-rss.nix Normal file
View file

@ -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";
};
};
})