diff --git a/hosts/manatee/modules/default.nix b/hosts/manatee/modules/default.nix index 7eeffd8..33f5043 100644 --- a/hosts/manatee/modules/default.nix +++ b/hosts/manatee/modules/default.nix @@ -15,6 +15,7 @@ in transmission.enable = true; audiobookshelf.enable = true; + immich.enable = true; }; }; } diff --git a/hosts/manatee/modules/immich/default.nix b/hosts/manatee/modules/immich/default.nix new file mode 100644 index 0000000..ac7410d --- /dev/null +++ b/hosts/manatee/modules/immich/default.nix @@ -0,0 +1,35 @@ +{ 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" ]; + }; + }; +}