/
ttrss.nix
46 lines (39 loc) · 1018 Bytes
/
ttrss.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
network.description = "Tiny Tiny RSS";
webserver =
{ config, pkgs, ... }:
with pkgs.lib;
{
# Webserver
services.httpd = {
enable = true;
adminAddr = "admin@example.com";
extraSubservices = singleton
{ function = import ./ttrss-service.nix;
siteHostName = "192.168.56.101";
};
};
# Database
services.postgresql = {
enable = true;
package = pkgs.postgresql;
authentication = ''
local ttrss all ident map=ttrssusers
local all all ident
'';
identMap = ''
ttrssusers root ttrss
ttrssusers wwwrun ttrss
'';
};
imports = [ ./ttrss-update.nix ];
# TTRSS-Update
# services.ttrssUpdate = {
# enable = true;
# # How to get the ttrssRoot path out of the ttrss subservice?
# ttrssRoot = ???;
# };
# Firewall
networking.firewall.allowedTCPPorts = [ 80 ];
};
}