36 lines
589 B
Nix
36 lines
589 B
Nix
{ lib, config, ... }:
|
|
let
|
|
enabled = config.mod.immich.enable;
|
|
in
|
|
{
|
|
options = {
|
|
mod.immich = {
|
|
enable = lib.mkEnableOption "Enable immich module";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf enabled {
|
|
users.users.immich = {
|
|
isSystemUser = true;
|
|
group = "storage";
|
|
|
|
extraGroups = [
|
|
"render"
|
|
"video"
|
|
];
|
|
};
|
|
|
|
services.immich = {
|
|
enable = true;
|
|
|
|
user = "immich";
|
|
group = "storage";
|
|
|
|
host = "0.0.0.0";
|
|
|
|
mediaLocation = "/mnt/cameras/public";
|
|
accelerationDevices = [ "/dev/dri/renderD128" ];
|
|
};
|
|
};
|
|
}
|