28 lines
505 B
Nix
Executable file
28 lines
505 B
Nix
Executable file
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.modules.immich;
|
|
|
|
immichRoot = "/storage/immich"; #TODO make this configurable through nix
|
|
immichPhotos = "${immichRoot}/photos";
|
|
in
|
|
{
|
|
options = {
|
|
modules = {
|
|
immich = {
|
|
enable = mkEnableOption "Deploy immich";
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.immich = {
|
|
enable = true;
|
|
port = 2283;
|
|
host = "0.0.0.0";
|
|
mediaLocation = immichPhotos;
|
|
settings = null;
|
|
};
|
|
};
|
|
}
|