my nix configs for my servers and desktop
1{ config, lib, pkgs, ... }:
2
3with lib;
4let
5 cfg = config.modules.immich;
6
7 immichRoot = "/storage/immich"; #TODO make this configurable through nix
8 immichPhotos = "${immichRoot}/photos";
9in
10{
11 options = {
12 modules = {
13 immich = {
14 enable = mkEnableOption "Deploy immich";
15 };
16 };
17 };
18
19 config = mkIf cfg.enable {
20 services.immich = {
21 enable = true;
22 port = 2283;
23 host = "0.0.0.0";
24 mediaLocation = immichPhotos;
25 settings = null;
26 };
27 };
28}