blob: 333ffb0c79e9cf6129b34f7340dd1ccf20bb4650 (
plain) (
blame)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
{ lib, pkgs, config, myconfig, mylibs, ... }:
let
adminer = pkgs.callPackage ../../commons/adminer.nix {};
ympd = pkgs.callPackage ./ympd.nix {
env = myconfig.env.tools.ympd;
};
ttrss = pkgs.callPackage ./ttrss.nix {
inherit (mylibs) fetchedGithub fetchedGit;
env = myconfig.env.tools.ttrss;
};
roundcubemail = pkgs.callPackage ./roundcubemail.nix { env = myconfig.env.tools.roundcubemail; };
wallabag = pkgs.callPackage ./wallabag.nix { env = myconfig.env.tools.wallabag; };
yourls = pkgs.callPackage ./yourls.nix {
inherit (mylibs) fetchedGithub;
env = myconfig.env.tools.yourls;
};
rompr = pkgs.callPackage ./rompr.nix {
inherit (mylibs) fetchedGithub;
env = myconfig.env.tools.rompr;
};
cfg = config.services.myWebsites.tools.tools;
in {
options.services.myWebsites.tools.tools = {
enable = lib.mkEnableOption "enable tools website";
};
config = lib.mkIf cfg.enable {
security.acme.certs."eldiron".extraDomains."tools.immae.eu" = null;
services.myWebsites.tools.modules =
adminer.apache.modules
++ ympd.apache.modules
++ ttrss.apache.modules
++ roundcubemail.apache.modules
++ wallabag.apache.modules
++ yourls.apache.modules
++ rompr.apache.modules;
services.ympd = ympd.config // { enable = true; };
services.myWebsites.tools.vhostConfs.tools = {
certName = "eldiron";
hosts = ["tools.immae.eu" ];
root = null;
extraConfig = [
adminer.apache.vhostConf
ympd.apache.vhostConf
ttrss.apache.vhostConf
roundcubemail.apache.vhostConf
wallabag.apache.vhostConf
yourls.apache.vhostConf
rompr.apache.vhostConf
];
};
services.myPhpfpm.poolConfigs = {
adminer = adminer.phpFpm.pool;
ttrss = ttrss.phpFpm.pool;
roundcubemail = roundcubemail.phpFpm.pool;
wallabag = wallabag.phpFpm.pool;
yourls = yourls.phpFpm.pool;
rompr = rompr.phpFpm.pool;
};
system.activationScripts = {
ttrss = ttrss.activationScript;
roundcubemail = roundcubemail.activationScript;
wallabag = wallabag.activationScript;
yourls = yourls.activationScript;
rompr = rompr.activationScript;
};
systemd.services.tt-rss = {
description = "Tiny Tiny RSS feeds update daemon";
serviceConfig = {
User = "wwwrun";
ExecStart = "${pkgs.php}/bin/php ${ttrss.webRoot}/update.php --daemon";
StandardOutput = "syslog";
StandardError = "syslog";
PermissionsStartOnly = true;
};
wantedBy = [ "multi-user.target" ];
requires = ["postgresql.service"];
after = ["network.target" "postgresql.service"];
};
};
}
|