mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-10 20:20:41 +03:00
55 lines
974 B
Nix
55 lines
974 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
inputs,
|
|
xlib,
|
|
...
|
|
}:
|
|
let
|
|
master = import inputs.nixpkgs-master {
|
|
system = "x86_64-linux";
|
|
};
|
|
in
|
|
{
|
|
services = {
|
|
immich = {
|
|
enable = true;
|
|
# package = master.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 = false;
|
|
enableVectorChord = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
# 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
|
|
];
|
|
};
|
|
}
|