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

29 lines
542 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;
virtualHosts."immich.davies.home".locations."/".proxyPass = "http://localhost:${toString config.services.immich.port}/";
};
2024-11-26 08:40:00 +00:00
};
}