···20 NoNewPrivileges = true;
21 PrivateUsers = true;
22 PrivateTmp = true;
23+ PrivateDevices = cfg.accelerationDevices == [ ];
24+ DeviceAllow = mkIf (cfg.accelerationDevices != null) cfg.accelerationDevices;
25 PrivateMounts = true;
26 ProtectClock = true;
27 ProtectControlGroups = true;
···160 Extra configuration environment variables. Refer to the [documentation](https://immich.app/docs/install/environment-variables) for options tagged with 'machine-learning'.
161 '';
162 };
163+ };
164+165+ accelerationDevices = mkOption {
166+ type = types.nullOr (types.listOf types.str);
167+ default = [ ];
168+ example = [ "/dev/dri/renderD128" ];
169+ description = ''
170+ A list of device paths to hardware acceleration devices that immich should
171+ have access to. This is useful when transcoding media files.
172+ The special value `[ ]` will disallow all devices using `PrivateDevices`. `null` will give access to all devices.
173+ '';
174 };
175176 database = {