about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-09-07 01:59:28 +0200
committerGitHub <noreply@github.com>2023-09-07 01:59:28 +0200
commit71c99509fd4d694f583f8970e974c868d6c65fc0 (patch)
tree8a7c6c829c0a6bde99b06895e55c2fbd8802d903 /nixos
parent88d4f507421805afa61c3865b9edb33295b14eaf (diff)
parent0138e327c1e3f879c22c54614476514705c04d54 (diff)
downloadnixlib-71c99509fd4d694f583f8970e974c868d6c65fc0.tar
nixlib-71c99509fd4d694f583f8970e974c868d6c65fc0.tar.gz
nixlib-71c99509fd4d694f583f8970e974c868d6c65fc0.tar.bz2
nixlib-71c99509fd4d694f583f8970e974c868d6c65fc0.tar.lz
nixlib-71c99509fd4d694f583f8970e974c868d6c65fc0.tar.xz
nixlib-71c99509fd4d694f583f8970e974c868d6c65fc0.tar.zst
nixlib-71c99509fd4d694f583f8970e974c868d6c65fc0.zip
Merge pull request #250224 from n0emis/grocy-4.0.2
grocy: 4.0.0 -> 4.0.2
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/web-apps/grocy.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/nixos/modules/services/web-apps/grocy.nix b/nixos/modules/services/web-apps/grocy.nix
index b0d3c44cea81..4d1084e295ff 100644
--- a/nixos/modules/services/web-apps/grocy.nix
+++ b/nixos/modules/services/web-apps/grocy.nix
@@ -115,9 +115,9 @@ in {
       user = "grocy";
       group = "nginx";
 
-      # PHP 8.1 is the only version which is supported/tested by upstream:
-      # https://github.com/grocy/grocy/blob/v4.0.0/README.md#platform-support
-      phpPackage = pkgs.php81;
+      # PHP 8.1 and 8.2 are the only version which are supported/tested by upstream:
+      # https://github.com/grocy/grocy/blob/v4.0.2/README.md#platform-support
+      phpPackage = pkgs.php82;
 
       inherit (cfg.phpfpm) settings;
 
@@ -130,6 +130,16 @@ in {
       };
     };
 
+    # After an update of grocy, the viewcache needs to be deleted. Otherwise grocy will not work
+    # https://github.com/grocy/grocy#how-to-update
+    systemd.services.grocy-setup = {
+      wantedBy = [ "multi-user.target" ];
+      before = [ "phpfpm-grocy.service" ];
+      script = ''
+        rm -rf ${cfg.dataDir}/viewcache/*
+      '';
+    };
+
     services.nginx = {
       enable = true;
       virtualHosts."${cfg.hostName}" = mkMerge [