diff options
author | Janne Heß <janne@hess.ooo> | 2021-07-13 18:22:28 +0200 |
---|---|---|
committer | Janne Heß <janne@hess.ooo> | 2021-07-13 18:31:15 +0200 |
commit | 6d203a68c624bbedaa7995f88d2e1e091bdb97f4 (patch) | |
tree | 22b370a783aabf2d591e83188845d774c0475b86 /nixos/modules/services/web-apps/icingaweb2 | |
parent | 3af5d881e0576325c572655a90c7604739804acc (diff) |
nixos/icingaweb2: Add ipl and thirdparty libraries
These are required since 2.9.0
Diffstat (limited to 'nixos/modules/services/web-apps/icingaweb2')
-rw-r--r-- | nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix index eea49bda283bf..f8f0854f1bcb5 100644 --- a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix +++ b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix @@ -23,6 +23,16 @@ in { ''; }; + libraryPaths = mkOption { + type = attrsOf package; + default = { }; + description = '' + Libraries to add to the Icingaweb2 library path. + The name of the attribute is the name of the library, the value + is the package to add. + ''; + }; + virtualHost = mkOption { type = nullOr str; default = "icingaweb2"; @@ -167,6 +177,9 @@ in { services.phpfpm.pools = mkIf (cfg.pool == "${poolName}") { ${poolName} = { user = "icingaweb2"; + phpEnv = { + ICINGAWEB_LIBDIR = toString (pkgs.linkFarm "icingaweb2-libdir" (mapAttrsToList (name: path: { inherit name path; }) cfg.libraryPaths)); + }; phpPackage = pkgs.php.withExtensions ({ enabled, all }: [ all.imagick ] ++ enabled); phpOptions = '' date.timezone = "${cfg.timezone}" @@ -184,6 +197,11 @@ in { }; }; + services.icingaweb2.libraryPaths = { + ipl = pkgs.icingaweb2-ipl; + thirdparty = pkgs.icingaweb2-thirdparty; + }; + systemd.services."phpfpm-${poolName}".serviceConfig.ReadWritePaths = [ "/etc/icingaweb2" ]; services.nginx = { |