From a1b3091db87edbf8dc76b07a04e45d813c515395 Mon Sep 17 00:00:00 2001 From: Ratchanan Srirattanamet Date: Sun, 24 Nov 2024 22:38:51 +0700 Subject: [PATCH 1/2] nixos/kimai: fix incorrect service name for PHP-FPM service mixin 'systemd.services' will append '.service' suffix, so the extra '.service' shouldn't be there. This fixes setting environment file. --- nixos/modules/services/web-apps/kimai.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/web-apps/kimai.nix b/nixos/modules/services/web-apps/kimai.nix index 06cb547b613a..23dfd1b1089e 100644 --- a/nixos/modules/services/web-apps/kimai.nix +++ b/nixos/modules/services/web-apps/kimai.nix @@ -335,7 +335,7 @@ in (mapAttrs' ( hostName: cfg: - (nameValuePair "phpfpm-kimai-${hostName}.service" { + (nameValuePair "phpfpm-kimai-${hostName}" { serviceConfig = { EnvironmentFile = [ cfg.environmentFile ]; }; From 106bef066f18b25ebefde3f2a75e8582ad22eb35 Mon Sep 17 00:00:00 2001 From: Ratchanan Srirattanamet Date: Sun, 24 Nov 2024 16:26:05 +0000 Subject: [PATCH 2/2] nixos/kimai: set PHP package for PHP-FPM pool to Kimai's PHP package I've already made it so that Kimai's PHP package has all required extensions. So use that instead of the default PHP package. This fixes a warning in Kimai's doctor page. --- nixos/modules/services/web-apps/kimai.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/web-apps/kimai.nix b/nixos/modules/services/web-apps/kimai.nix index 23dfd1b1089e..91735b282fcc 100644 --- a/nixos/modules/services/web-apps/kimai.nix +++ b/nixos/modules/services/web-apps/kimai.nix @@ -238,6 +238,7 @@ in services.phpfpm.pools = mapAttrs' ( hostName: cfg: (nameValuePair "kimai-${hostName}" { + phpPackage = cfg.package.php; inherit user; group = webserver.group; settings = {