Loading nixos/modules/services/web-apps/immich.nix +42 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ }: let cfg = config.services.immich; format = pkgs.formats.json { }; isPostgresUnixSocket = lib.hasPrefix "/" cfg.database.host; isRedisUnixSocket = lib.hasPrefix "/" cfg.redis.host; Loading Loading @@ -110,6 +111,37 @@ in description = "The group immich should run as."; }; settings = mkOption { default = null; description = '' Configuration for Immich. See <https://immich.app/docs/install/config-file/> or navigate to <https://your-immich-domain/admin/system-settings> for options and defaults. Setting it to `null` allows configuring Immich in the web interface. ''; type = types.nullOr ( types.submodule { freeformType = format.type; options = { newVersionCheck.enabled = mkOption { type = types.bool; default = false; description = '' Check for new versions. This feature relies on periodic communication with github.com. ''; }; server.externalDomain = mkOption { type = types.str; default = ""; description = "Domain for publicly shared links, including `http(s)://`."; }; }; } ); }; machine-learning = { enable = mkEnableOption "immich's machine-learning functionality to detect faces and search for objects" Loading Loading @@ -262,6 +294,9 @@ in IMMICH_PORT = toString cfg.port; IMMICH_MEDIA_LOCATION = cfg.mediaLocation; IMMICH_MACHINE_LEARNING_URL = "http://localhost:3003"; } // lib.optionalAttrs (cfg.settings != null) { IMMICH_CONFIG_FILE = "${format.generate "immich.json" cfg.settings}"; }; services.immich.machine-learning.environment = { Loading @@ -272,6 +307,11 @@ in IMMICH_PORT = "3003"; }; systemd.slices.system-immich = { description = "Immich (self-hosted photo and video backup solution) slice"; documentation = [ "https://immich.app/docs" ]; }; systemd.services.immich-server = { description = "Immich backend server (Self-hosted photo and video backup solution)"; after = [ "network.target" ]; Loading @@ -281,6 +321,7 @@ in serviceConfig = commonServiceConfig // { ExecStart = lib.getExe cfg.package; EnvironmentFile = mkIf (cfg.secretsFile != null) cfg.secretsFile; Slice = "system-immich.slice"; StateDirectory = "immich"; SyslogIdentifier = "immich"; RuntimeDirectory = "immich"; Loading @@ -300,6 +341,7 @@ in inherit (cfg.machine-learning) environment; serviceConfig = commonServiceConfig // { ExecStart = lib.getExe (cfg.package.machine-learning.override { immich = cfg.package; }); Slice = "system-immich.slice"; CacheDirectory = "immich"; User = cfg.user; Group = cfg.group; Loading pkgs/by-name/im/immich-machine-learning/package.nix +0 −5 Original line number Diff line number Diff line Loading @@ -28,11 +28,6 @@ python.pkgs.buildPythonApplication rec { "pydantic-settings" ]; pythonRemoveDeps = [ # https://github.com/immich-app/immich/pull/13762 "setuptools" ]; build-system = with python.pkgs; [ poetry-core cython Loading pkgs/by-name/im/immich/sources.json +10 −10 Original line number Diff line number Diff line { "version": "1.119.0", "hash": "sha256-mflVxz+Pxv7xS4onsjRQ1lMZ43U/rkuqO6vPRon7Gms=", "version": "1.119.1", "hash": "sha256-T+bIL2LaVNgFT3xBUxiEzhyDiLpw/WU7mxttuJD39SQ=", "components": { "cli": { "npmDepsHash": "sha256-QClG/WQK2MbVKuR0Wk9+TdSTAbemtFeg7GkKjvEjC4c=", "version": "2.2.27" "npmDepsHash": "sha256-kTBlo6eIPswZC0GQG7IoqQZ5b7wPEXFaD/SuuaEQMEg=", "version": "2.2.28" }, "server": { "npmDepsHash": "sha256-9mMnOiKsTTO4PJUKYN668yjIELeFUgdqSx6Gf87UYVU=", "version": "1.119.0" "npmDepsHash": "sha256-zgzqh3TyafPKuk5RZ2I/haYFzMVlI4jGnwD5XLqTBdg=", "version": "1.119.1" }, "web": { "npmDepsHash": "sha256-ieTGMywR26msYqmQOK/q/l3O6/Vkmu0TLFn956kK/xE=", "version": "1.119.0" "npmDepsHash": "sha256-LPtsMzF7yYGrrpDoYoba6OQphKY7AvGbJpPc5pS4eFU=", "version": "1.119.1" }, "open-api/typescript-sdk": { "npmDepsHash": "sha256-NLvuHTVWuzv5G0ONu3S3K8AgyliTZowYQN0fzYhWtUQ=", "version": "1.119.0" "npmDepsHash": "sha256-dyKmDez8jO6p+cmSa2KMe9zzhXn4on3aFUMdep+gjzU=", "version": "1.119.1" } } } pkgs/development/python-modules/insightface/default.nix +2 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ fetchPypi, insightface, matplotlib, mxnet, numpy, onnx, onnxruntime, Loading Loading @@ -45,6 +46,7 @@ buildPythonPackage rec { albumentations easydict matplotlib mxnet # used in insightface/commands/rec_add_mask_param.py numpy onnx onnxruntime Loading pkgs/development/python-modules/mxnet/default.nix +12 −5 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ lib, buildPythonPackage, pkgs, setuptools, distutils, requests, numpy, graphviz, Loading @@ -12,16 +14,23 @@ buildPythonPackage { inherit (pkgs.mxnet) pname version src; pyproject = true; format = "setuptools"; build-system = [ setuptools ]; buildInputs = [ pkgs.mxnet ]; propagatedBuildInputs = [ dependencies = [ distutils requests numpy graphviz ]; pythonRelaxDeps = [ "graphviz" ]; LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.mxnet ]; doCheck = !isPy3k; Loading @@ -29,9 +38,7 @@ buildPythonPackage { postPatch = '' # Required to support numpy >=1.24 where np.bool is removed in favor of just bool substituteInPlace python/mxnet/numpy/utils.py \ --replace "bool = onp.bool" "bool = bool" substituteInPlace python/setup.py \ --replace "graphviz<0.9.0," "graphviz" --replace-fail "bool = onp.bool" "bool = bool" ''; preConfigure = '' Loading Loading
nixos/modules/services/web-apps/immich.nix +42 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ }: let cfg = config.services.immich; format = pkgs.formats.json { }; isPostgresUnixSocket = lib.hasPrefix "/" cfg.database.host; isRedisUnixSocket = lib.hasPrefix "/" cfg.redis.host; Loading Loading @@ -110,6 +111,37 @@ in description = "The group immich should run as."; }; settings = mkOption { default = null; description = '' Configuration for Immich. See <https://immich.app/docs/install/config-file/> or navigate to <https://your-immich-domain/admin/system-settings> for options and defaults. Setting it to `null` allows configuring Immich in the web interface. ''; type = types.nullOr ( types.submodule { freeformType = format.type; options = { newVersionCheck.enabled = mkOption { type = types.bool; default = false; description = '' Check for new versions. This feature relies on periodic communication with github.com. ''; }; server.externalDomain = mkOption { type = types.str; default = ""; description = "Domain for publicly shared links, including `http(s)://`."; }; }; } ); }; machine-learning = { enable = mkEnableOption "immich's machine-learning functionality to detect faces and search for objects" Loading Loading @@ -262,6 +294,9 @@ in IMMICH_PORT = toString cfg.port; IMMICH_MEDIA_LOCATION = cfg.mediaLocation; IMMICH_MACHINE_LEARNING_URL = "http://localhost:3003"; } // lib.optionalAttrs (cfg.settings != null) { IMMICH_CONFIG_FILE = "${format.generate "immich.json" cfg.settings}"; }; services.immich.machine-learning.environment = { Loading @@ -272,6 +307,11 @@ in IMMICH_PORT = "3003"; }; systemd.slices.system-immich = { description = "Immich (self-hosted photo and video backup solution) slice"; documentation = [ "https://immich.app/docs" ]; }; systemd.services.immich-server = { description = "Immich backend server (Self-hosted photo and video backup solution)"; after = [ "network.target" ]; Loading @@ -281,6 +321,7 @@ in serviceConfig = commonServiceConfig // { ExecStart = lib.getExe cfg.package; EnvironmentFile = mkIf (cfg.secretsFile != null) cfg.secretsFile; Slice = "system-immich.slice"; StateDirectory = "immich"; SyslogIdentifier = "immich"; RuntimeDirectory = "immich"; Loading @@ -300,6 +341,7 @@ in inherit (cfg.machine-learning) environment; serviceConfig = commonServiceConfig // { ExecStart = lib.getExe (cfg.package.machine-learning.override { immich = cfg.package; }); Slice = "system-immich.slice"; CacheDirectory = "immich"; User = cfg.user; Group = cfg.group; Loading
pkgs/by-name/im/immich-machine-learning/package.nix +0 −5 Original line number Diff line number Diff line Loading @@ -28,11 +28,6 @@ python.pkgs.buildPythonApplication rec { "pydantic-settings" ]; pythonRemoveDeps = [ # https://github.com/immich-app/immich/pull/13762 "setuptools" ]; build-system = with python.pkgs; [ poetry-core cython Loading
pkgs/by-name/im/immich/sources.json +10 −10 Original line number Diff line number Diff line { "version": "1.119.0", "hash": "sha256-mflVxz+Pxv7xS4onsjRQ1lMZ43U/rkuqO6vPRon7Gms=", "version": "1.119.1", "hash": "sha256-T+bIL2LaVNgFT3xBUxiEzhyDiLpw/WU7mxttuJD39SQ=", "components": { "cli": { "npmDepsHash": "sha256-QClG/WQK2MbVKuR0Wk9+TdSTAbemtFeg7GkKjvEjC4c=", "version": "2.2.27" "npmDepsHash": "sha256-kTBlo6eIPswZC0GQG7IoqQZ5b7wPEXFaD/SuuaEQMEg=", "version": "2.2.28" }, "server": { "npmDepsHash": "sha256-9mMnOiKsTTO4PJUKYN668yjIELeFUgdqSx6Gf87UYVU=", "version": "1.119.0" "npmDepsHash": "sha256-zgzqh3TyafPKuk5RZ2I/haYFzMVlI4jGnwD5XLqTBdg=", "version": "1.119.1" }, "web": { "npmDepsHash": "sha256-ieTGMywR26msYqmQOK/q/l3O6/Vkmu0TLFn956kK/xE=", "version": "1.119.0" "npmDepsHash": "sha256-LPtsMzF7yYGrrpDoYoba6OQphKY7AvGbJpPc5pS4eFU=", "version": "1.119.1" }, "open-api/typescript-sdk": { "npmDepsHash": "sha256-NLvuHTVWuzv5G0ONu3S3K8AgyliTZowYQN0fzYhWtUQ=", "version": "1.119.0" "npmDepsHash": "sha256-dyKmDez8jO6p+cmSa2KMe9zzhXn4on3aFUMdep+gjzU=", "version": "1.119.1" } } }
pkgs/development/python-modules/insightface/default.nix +2 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ fetchPypi, insightface, matplotlib, mxnet, numpy, onnx, onnxruntime, Loading Loading @@ -45,6 +46,7 @@ buildPythonPackage rec { albumentations easydict matplotlib mxnet # used in insightface/commands/rec_add_mask_param.py numpy onnx onnxruntime Loading
pkgs/development/python-modules/mxnet/default.nix +12 −5 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ lib, buildPythonPackage, pkgs, setuptools, distutils, requests, numpy, graphviz, Loading @@ -12,16 +14,23 @@ buildPythonPackage { inherit (pkgs.mxnet) pname version src; pyproject = true; format = "setuptools"; build-system = [ setuptools ]; buildInputs = [ pkgs.mxnet ]; propagatedBuildInputs = [ dependencies = [ distutils requests numpy graphviz ]; pythonRelaxDeps = [ "graphviz" ]; LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.mxnet ]; doCheck = !isPy3k; Loading @@ -29,9 +38,7 @@ buildPythonPackage { postPatch = '' # Required to support numpy >=1.24 where np.bool is removed in favor of just bool substituteInPlace python/mxnet/numpy/utils.py \ --replace "bool = onp.bool" "bool = bool" substituteInPlace python/setup.py \ --replace "graphviz<0.9.0," "graphviz" --replace-fail "bool = onp.bool" "bool = bool" ''; preConfigure = '' Loading