]>
Commit | Line | Data |
---|---|---|
9d90e7e2 | 1 | { lib, pkgs, config, myconfig, mylibs, ... }: |
10889174 IB |
2 | let |
3 | adminer = pkgs.callPackage ../../commons/adminer.nix {}; | |
bfe3c9c9 IB |
4 | ympd = pkgs.callPackage ./ympd.nix { |
5 | env = myconfig.env.tools.ympd; | |
6 | }; | |
9d90e7e2 IB |
7 | ttrss = pkgs.callPackage ./ttrss.nix { |
8 | inherit (mylibs) fetchedGithub fetchedGit; | |
9 | env = myconfig.env.tools.ttrss; | |
10 | }; | |
11 | roundcubemail = pkgs.callPackage ./roundcubemail.nix { env = myconfig.env.tools.roundcubemail; }; | |
12 | wallabag = pkgs.callPackage ./wallabag.nix { env = myconfig.env.tools.wallabag; }; | |
133ebaee IB |
13 | yourls = pkgs.callPackage ./yourls.nix { |
14 | inherit (mylibs) fetchedGithub; | |
15 | env = myconfig.env.tools.yourls; | |
16 | }; | |
bfe3c9c9 IB |
17 | rompr = pkgs.callPackage ./rompr.nix { |
18 | inherit (mylibs) fetchedGithub; | |
19 | env = myconfig.env.tools.rompr; | |
20 | }; | |
95b20e17 IB |
21 | shaarli = pkgs.callPackage ./shaarli.nix { |
22 | env = myconfig.env.tools.shaarli; | |
23 | }; | |
b892dcbe IB |
24 | dokuwiki = pkgs.callPackage ./dokuwiki.nix { |
25 | inherit (mylibs) fetchedGithub; | |
26 | }; | |
10889174 IB |
27 | |
28 | cfg = config.services.myWebsites.tools.tools; | |
29 | in { | |
30 | options.services.myWebsites.tools.tools = { | |
31 | enable = lib.mkEnableOption "enable tools website"; | |
32 | }; | |
33 | ||
34 | config = lib.mkIf cfg.enable { | |
35 | security.acme.certs."eldiron".extraDomains."tools.immae.eu" = null; | |
36 | ||
37 | services.myWebsites.tools.modules = | |
38 | adminer.apache.modules | |
39 | ++ ympd.apache.modules | |
40 | ++ ttrss.apache.modules | |
aebd817b | 41 | ++ roundcubemail.apache.modules |
133ebaee | 42 | ++ wallabag.apache.modules |
bfe3c9c9 | 43 | ++ yourls.apache.modules |
95b20e17 | 44 | ++ rompr.apache.modules |
b892dcbe IB |
45 | ++ shaarli.apache.modules |
46 | ++ dokuwiki.apache.modules; | |
10889174 | 47 | |
bfe3c9c9 | 48 | services.ympd = ympd.config // { enable = true; }; |
10889174 IB |
49 | |
50 | services.myWebsites.tools.vhostConfs.tools = { | |
51 | certName = "eldiron"; | |
52 | hosts = ["tools.immae.eu" ]; | |
53 | root = null; | |
54 | extraConfig = [ | |
55 | adminer.apache.vhostConf | |
56 | ympd.apache.vhostConf | |
57 | ttrss.apache.vhostConf | |
58 | roundcubemail.apache.vhostConf | |
aebd817b | 59 | wallabag.apache.vhostConf |
133ebaee | 60 | yourls.apache.vhostConf |
bfe3c9c9 | 61 | rompr.apache.vhostConf |
95b20e17 | 62 | shaarli.apache.vhostConf |
b892dcbe | 63 | dokuwiki.apache.vhostConf |
10889174 IB |
64 | ]; |
65 | }; | |
66 | ||
67 | services.myPhpfpm.poolConfigs = { | |
68 | adminer = adminer.phpFpm.pool; | |
69 | ttrss = ttrss.phpFpm.pool; | |
70 | roundcubemail = roundcubemail.phpFpm.pool; | |
aebd817b | 71 | wallabag = wallabag.phpFpm.pool; |
133ebaee | 72 | yourls = yourls.phpFpm.pool; |
bfe3c9c9 | 73 | rompr = rompr.phpFpm.pool; |
95b20e17 | 74 | shaarli = shaarli.phpFpm.pool; |
b892dcbe | 75 | dokuwiki = dokuwiki.phpFpm.pool; |
10889174 IB |
76 | }; |
77 | ||
78 | system.activationScripts = { | |
79 | ttrss = ttrss.activationScript; | |
80 | roundcubemail = roundcubemail.activationScript; | |
aebd817b | 81 | wallabag = wallabag.activationScript; |
133ebaee | 82 | yourls = yourls.activationScript; |
bfe3c9c9 | 83 | rompr = rompr.activationScript; |
95b20e17 | 84 | shaarli = shaarli.activationScript; |
b892dcbe | 85 | dokuwiki = dokuwiki.activationScript; |
10889174 IB |
86 | }; |
87 | ||
88 | systemd.services.tt-rss = { | |
89 | description = "Tiny Tiny RSS feeds update daemon"; | |
90 | serviceConfig = { | |
91 | User = "wwwrun"; | |
92 | ExecStart = "${pkgs.php}/bin/php ${ttrss.webRoot}/update.php --daemon"; | |
93 | StandardOutput = "syslog"; | |
94 | StandardError = "syslog"; | |
95 | PermissionsStartOnly = true; | |
96 | }; | |
97 | ||
98 | wantedBy = [ "multi-user.target" ]; | |
99 | requires = ["postgresql.service"]; | |
100 | after = ["network.target" "postgresql.service"]; | |
101 | }; | |
102 | ||
103 | }; | |
104 | } | |
105 |