mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-10 20:20:41 +03:00
56 lines
1005 B
Nix
56 lines
1005 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
inputs,
|
|
xlib,
|
|
...
|
|
}:
|
|
let
|
|
master = import inputs.nixpkgs-immich {
|
|
system = "x86_64-linux";
|
|
};
|
|
in
|
|
{
|
|
services = {
|
|
immich = {
|
|
enable = true;
|
|
package = pkgs.immich;
|
|
port = 2283;
|
|
host = "0.0.0.0";
|
|
openFirewall = true;
|
|
accelerationDevices = null;
|
|
machine-learning.enable = true;
|
|
mediaLocation = "${xlib.dirs.services-mnt-folder}/immich";
|
|
database = {
|
|
enableVectors = true;
|
|
# enableVectorChord = false;
|
|
};
|
|
};
|
|
# postgresql.package = pkgs.postgresql_16;
|
|
};
|
|
|
|
fileSystems."${config.services.immich.mediaLocation}" = {
|
|
device = "${xlib.dirs.services-folder}/immich";
|
|
options = [
|
|
"bind"
|
|
"nofail"
|
|
];
|
|
};
|
|
|
|
systemd.tmpfiles.rules = [
|
|
"z ${config.services.immich.mediaLocation} 0755 immich immich -"
|
|
];
|
|
|
|
users.users.immich.extraGroups = [
|
|
"video"
|
|
"render"
|
|
];
|
|
|
|
environment = {
|
|
systemPackages = with pkgs; [
|
|
immich-cli
|
|
];
|
|
};
|
|
}
|