From e2da1219d4582f8db93f04536bd9ce97eaffbe8f Mon Sep 17 00:00:00 2001 From: Janne Heß Date: Thu, 15 Oct 2020 16:16:33 +0200 Subject: nixos/icingaweb2: Fix php packages --- nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix') diff --git a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix index d9ad7e9e3d3..eea49bda283 100644 --- a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix +++ b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix @@ -167,8 +167,8 @@ in { services.phpfpm.pools = mkIf (cfg.pool == "${poolName}") { ${poolName} = { user = "icingaweb2"; + phpPackage = pkgs.php.withExtensions ({ enabled, all }: [ all.imagick ] ++ enabled); phpOptions = '' - extension = ${pkgs.phpPackages.imagick}/lib/php/extensions/imagick.so date.timezone = "${cfg.timezone}" ''; settings = mapAttrs (name: mkDefault) { -- cgit 1.4.1 From 6d203a68c624bbedaa7995f88d2e1e091bdb97f4 Mon Sep 17 00:00:00 2001 From: Janne Heß Date: Tue, 13 Jul 2021 18:22:28 +0200 Subject: nixos/icingaweb2: Add ipl and thirdparty libraries These are required since 2.9.0 --- .../manual/from_md/release-notes/rl-2111.section.xml | 10 +++++++++- nixos/doc/manual/release-notes/rl-2111.section.md | 2 ++ .../services/web-apps/icingaweb2/icingaweb2.nix | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) (limited to 'nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix') diff --git a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml index 53c1a18a507..66a3f908129 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml @@ -479,7 +479,7 @@ - + yggdrasil was upgraded to a new major @@ -488,6 +488,14 @@ changelog. + + + icingaweb2 was upgraded to a new release + which requires a manual database upgrade, see + upstream + changelog. + +
diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md index ad56b5cd7d7..d270a362079 100644 --- a/nixos/doc/manual/release-notes/rl-2111.section.md +++ b/nixos/doc/manual/release-notes/rl-2111.section.md @@ -120,6 +120,8 @@ In addition to numerous new and upgraded packages, this release has the followin - `yggdrasil` was upgraded to a new major release with breaking changes, see [upstream changelog](https://github.com/yggdrasil-network/yggdrasil-go/releases/tag/v0.4.0). +- `icingaweb2` was upgraded to a new release which requires a manual database upgrade, see [upstream changelog](https://github.com/Icinga/icingaweb2/releases/tag/v2.9.0). + ## Other Notable Changes {#sec-release-21.11-notable-changes} - The setting [`services.openssh.logLevel`](options.html#opt-services.openssh.logLevel) `"VERBOSE"` `"INFO"`. This brings NixOS in line with upstream and other Linux distributions, and reduces log spam on servers due to bruteforcing botnets. diff --git a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix index eea49bda283..f8f0854f1bc 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 = { -- cgit 1.4.1