dotfiles/nix/modules/nixos/features/homelab/immich.nix

30 lines
554 B
Nix
Raw Normal View History

2024-11-26 08:40:00 +00:00
{
config,
lib,
pkgs,
...
}:
2024-12-10 21:40:33 +00:00
with lib;
2024-11-26 08:40:00 +00:00
{
2024-12-10 21:40:33 +00:00
options.features.homelab.immich.enable = mkEnableOption "Enable immich";
2024-11-26 08:40:00 +00:00
2024-12-10 21:40:33 +00:00
config = mkIf config.features.homelab.immich.enable {
services.immich = {
enable = true;
group = "media";
mediaLocation = "/mnt/media/immich";
};
2024-11-26 08:40:00 +00:00
environment.systemPackages = [ pkgs.immich-cli ];
services.nginx = {
enable = true;
2024-12-26 21:35:05 +00:00
virtualHosts."immich.oliverdavies.uk".locations."/".proxyPass =
"http://localhost:${toString config.services.immich.port}/";
};
2024-11-26 08:40:00 +00:00
};
}