1 { lib, pkgs, config, myconfig, mylibs, ... }:
3 adminer = pkgs.callPackage ../../commons/adminer.nix {};
4 ympd = pkgs.callPackage ./ympd.nix {};
5 ttrss = pkgs.callPackage ./ttrss.nix {
6 inherit (mylibs) fetchedGithub fetchedGit;
7 env = myconfig.env.tools.ttrss;
9 roundcubemail = pkgs.callPackage ./roundcubemail.nix { env = myconfig.env.tools.roundcubemail; };
10 wallabag = pkgs.callPackage ./wallabag.nix { env = myconfig.env.tools.wallabag; };
12 cfg = config.services.myWebsites.tools.tools;
14 options.services.myWebsites.tools.tools = {
15 enable = lib.mkEnableOption "enable tools website";
18 config = lib.mkIf cfg.enable {
19 security.acme.certs."eldiron".extraDomains."tools.immae.eu" = null;
21 services.myWebsites.tools.modules =
22 adminer.apache.modules
23 ++ ympd.apache.modules
24 ++ ttrss.apache.modules
25 ++ roundcubemail.apache.modules
26 ++ wallabag.apache.modules;
28 services.ympd = ympd.config // { enable = false; };
30 services.myWebsites.tools.vhostConfs.tools = {
32 hosts = ["tools.immae.eu" ];
35 adminer.apache.vhostConf
37 ttrss.apache.vhostConf
38 roundcubemail.apache.vhostConf
39 wallabag.apache.vhostConf
43 services.myPhpfpm.poolConfigs = {
44 adminer = adminer.phpFpm.pool;
45 ttrss = ttrss.phpFpm.pool;
46 roundcubemail = roundcubemail.phpFpm.pool;
47 wallabag = wallabag.phpFpm.pool;
50 system.activationScripts = {
51 ttrss = ttrss.activationScript;
52 roundcubemail = roundcubemail.activationScript;
53 wallabag = wallabag.activationScript;
56 systemd.services.tt-rss = {
57 description = "Tiny Tiny RSS feeds update daemon";
60 ExecStart = "${pkgs.php}/bin/php ${ttrss.webRoot}/update.php --daemon";
61 StandardOutput = "syslog";
62 StandardError = "syslog";
63 PermissionsStartOnly = true;
66 wantedBy = [ "multi-user.target" ];
67 requires = ["postgresql.service"];
68 after = ["network.target" "postgresql.service"];