chore(grocy): shared data

This commit is contained in:
arcnmx 2024-04-03 13:38:43 -07:00
parent fbf96aacef
commit 01219383bb

View file

@ -1,8 +1,5 @@
{config, lib, ...}: let
inherit (lib.modules) mkIf mkDefault mkAfter;
inherit (lib.strings) escapeRegex;
inherit (config.services) nginx;
inherit (config) networking;
cfg = config.services.grocy;
in {
config = {
@ -70,5 +67,21 @@ in {
users.users.grocy = mkIf cfg.enable {
uid = 911;
};
systemd.services = let
BindPaths = [
"/mnt/shared/grocy:${cfg.dataDir}"
];
in mkIf cfg.enable {
grocy-setup = {
serviceConfig = {
inherit BindPaths;
};
};
phpfpm-grocy = {
serviceConfig = {
inherit BindPaths;
};
};
};
};
}