diff --git a/hosts/tsumugi/immich.nix b/hosts/tsumugi/immich.nix index 676ec98..3a270be 100644 --- a/hosts/tsumugi/immich.nix +++ b/hosts/tsumugi/immich.nix @@ -7,6 +7,7 @@ }: let unstable = inputs.unstable.legacyPackages.${pkgs.stdenv.hostPlatform.system}; + cfg = config.services.immich; in lib.mkMerge [ (lib.mkAssert (lib.versionOlder config.services.immich.package.version "4") @@ -20,7 +21,15 @@ lib.mkMerge [ host = "0.0.0.0"; openFirewall = true; mediaLocation = "/mnt/clientmedia/immich"; - accelerationDevices = [ "/dev/dri/renderD128" ]; + accelerationDevices = null; # allow all devices + machine-learning.environment = { + XDG_RUNTIME_DIR = "/run/immich"; + }; }; + users.users.${cfg.user}.extraGroups = [ + "video" + "render" + ]; + systemd.services.immich-machine-learning.serviceConfig.PrivateDevices = lib.mkForce true; # Force CPU } ]