1 { lib, pkgs, config, mylibs, ... }:
3 adminer = pkgs.callPackage ../../commons/adminer.nix {};
4 ympd = pkgs.callPackage ./ympd.nix {};
5 ttrss = pkgs.callPackage ./ttrss.nix { inherit (mylibs) checkEnv fetchedGithub fetchedGit; };
6 roundcubemail = pkgs.callPackage ./roundcubemail.nix { inherit (mylibs) checkEnv; };
8 cfg = config.services.myWebsites.tools.tools;
10 options.services.myWebsites.tools.tools = {
11 enable = lib.mkEnableOption "enable tools website";
14 config = lib.mkIf cfg.enable {
15 security.acme.certs."eldiron".extraDomains."tools.immae.eu" = null;
17 services.myWebsites.tools.modules =
18 adminer.apache.modules
19 ++ ympd.apache.modules
20 ++ ttrss.apache.modules
21 ++ roundcubemail.apache.modules;
23 services.ympd = ympd.config // { enable = false; };
25 services.myWebsites.tools.vhostConfs.tools = {
27 hosts = ["tools.immae.eu" ];
30 adminer.apache.vhostConf
32 ttrss.apache.vhostConf
33 roundcubemail.apache.vhostConf
37 services.myPhpfpm.poolConfigs = {
38 adminer = adminer.phpFpm.pool;
39 ttrss = ttrss.phpFpm.pool;
40 roundcubemail = roundcubemail.phpFpm.pool;
43 system.activationScripts = {
44 ttrss = ttrss.activationScript;
45 roundcubemail = roundcubemail.activationScript;
48 systemd.services.tt-rss = {
49 description = "Tiny Tiny RSS feeds update daemon";
52 ExecStart = "${pkgs.php}/bin/php ${ttrss.webRoot}/update.php --daemon";
53 StandardOutput = "syslog";
54 StandardError = "syslog";
55 PermissionsStartOnly = true;
58 wantedBy = [ "multi-user.target" ];
59 requires = ["postgresql.service"];
60 after = ["network.target" "postgresql.service"];