tt-rss: init service
This commit is contained in:
parent
35f22bbe00
commit
aa081e8ebb
3 changed files with 41 additions and 0 deletions
|
@ -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;
|
||||
|
|
15
services/nginx_vHosts/tt-rss.nix
Normal file
15
services/nginx_vHosts/tt-rss.nix
Normal 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
21
services/tt-rss.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
})
|
Loading…
Reference in a new issue