Skip to content

Commit 89e158e

Browse files
nextcloud: drop configureRecognize in favor of upstream package (#224)
1 parent 74515a7 commit 89e158e

File tree

1 file changed

+11
-31
lines changed

1 file changed

+11
-31
lines changed

modules/nextcloud.nix

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,19 @@ in
2828
By default this is enabled, when Imaginary is configured.
2929
'';
3030
};
31-
32-
configureRecognize = lib.mkEnableOption "" // { description = ''
33-
Whether to configure dependencies for Recognize App.
34-
35-
::: {.note}
36-
This currently does not work with declerataive installed apps.
37-
:::
38-
''; };
3931
};
4032
};
4133

34+
imports = [
35+
(lib.mkRemovedOptionModule ["services" "nextcloud" "configureRecognize"] ''
36+
configureRecognize has been removed in favor of using the recognize packages from NixOS like:
37+
38+
services.nextcloud.extraApps = {
39+
inherit (pkgs."nextcloud${lib.versions.major config.services.nextcloud.package.version}Packages".apps) recognize;
40+
};
41+
'')
42+
];
43+
4244
config = lib.mkIf cfg.enable {
4345
services = {
4446
imaginary = lib.mkIf cfg.configureImaginary {
@@ -185,19 +187,6 @@ in
185187
};
186188
};
187189

188-
nextcloud-setup = lib.mkIf cfg.configureRecognize {
189-
script = /* bash */ ''
190-
export PATH=$PATH:/etc/profiles/per-user/nextcloud/bin:/run/current-system/sw/bin
191-
192-
if [[ ! -e ${cfg.home}/store-apps/recognize/node_modules/@tensorflow/tfjs-node/lib/napi-v8/tfjs_binding.node ]]; then
193-
if [[ -d ${cfg.home}/store-apps/recognize/node_modules/ ]]; then
194-
cd ${cfg.home}/store-apps/recognize/node_modules/
195-
npm rebuild @tensorflow/tfjs-node --build-addon-from-source
196-
fi
197-
fi
198-
'';
199-
};
200-
201190
phpfpm-nextcloud.serviceConfig = lib.mkIf (cfg.configureMemories && cfg.configureMemoriesVaapi) {
202191
DeviceAllow = [ "/dev/dri/renderD128 rwm" ];
203192
PrivateDevices = lib.mkForce false;
@@ -225,16 +214,7 @@ in
225214
# generate video thumbnails with preview generator
226215
lib.optional cfg.configurePreviewSettings ffmpeg-headless
227216
# required for memories, duplicated with nextcloud-cron to better debug
228-
++ lib.optional cfg.configureMemories perl
229-
# required for recognize app
230-
++ lib.optionals cfg.configureRecognize [
231-
gnumake # installation requirement
232-
nodejs_20 # runtime and installation requirement
233-
# TODO: drop with 23.11
234-
(pkgs.node-pre-gyp or nodejs_20.pkgs.node-pre-gyp) # installation requirement
235-
python3 # requirement for node-pre-gyp otherwise fails with exit code 236
236-
util-linux # runtime requirement for taskset
237-
];
217+
++ lib.optional cfg.configureMemories perl;
238218
};
239219
};
240220
}

0 commit comments

Comments
 (0)