|
28 | 28 | By default this is enabled, when Imaginary is configured.
|
29 | 29 | '';
|
30 | 30 | };
|
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 |
| - ''; }; |
39 | 31 | };
|
40 | 32 | };
|
41 | 33 |
|
| 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 | + |
42 | 44 | config = lib.mkIf cfg.enable {
|
43 | 45 | services = {
|
44 | 46 | imaginary = lib.mkIf cfg.configureImaginary {
|
|
185 | 187 | };
|
186 | 188 | };
|
187 | 189 |
|
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 |
| - |
201 | 190 | phpfpm-nextcloud.serviceConfig = lib.mkIf (cfg.configureMemories && cfg.configureMemoriesVaapi) {
|
202 | 191 | DeviceAllow = [ "/dev/dri/renderD128 rwm" ];
|
203 | 192 | PrivateDevices = lib.mkForce false;
|
|
225 | 214 | # generate video thumbnails with preview generator
|
226 | 215 | lib.optional cfg.configurePreviewSettings ffmpeg-headless
|
227 | 216 | # 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; |
238 | 218 | };
|
239 | 219 | };
|
240 | 220 | }
|
0 commit comments