Fix immich

This commit is contained in:
Oliver Davies 2025-04-28 01:58:11 +01:00
parent e1c30789a2
commit 0bba7ff4f8
4 changed files with 47 additions and 13 deletions

View file

@ -17,6 +17,7 @@
core.openssh.enable = true;
cli.podman.enable = true;
desktop.dconf.enable = true;
homelab.immich.enable = true;
};
services.logind.lidSwitchExternalPower = "ignore";

View file

@ -23,6 +23,7 @@
"luke.oliverdavies.uk"
"nixedo.oliverdavies.uk"
"paperless.oliverdavies.uk"
"photos.oliverdavies.uk"
"phpsw-sculpin-demo.oliverdavies.uk"
"rebuilding-acquia.oliverdavies.uk"
"rebuilding-bartik.oliverdavies.uk"

View file

@ -1,19 +1,42 @@
{ config, pkgs, ... }:
{
services = {
immich = {
enable = true;
group = "media";
mediaLocation = "/mnt/media/immich";
};
config,
lib,
pkgs,
...
}:
caddy.virtualHosts."immich.oliverdavies.uk" = {
useACMEHost = "oliverdavies.uk";
with lib;
extraConfig = "reverse_proxy localhost:${toString config.services.immich.port}";
};
let
cfg = config.nixosModules.homelab.immich;
in
{
options.nixosModules.homelab.immich = {
enable = mkEnableOption "Enable immich";
};
environment.systemPackages = [ pkgs.immich-cli ];
config = mkIf cfg.enable {
services = {
immich = {
enable = true;
group = "media";
mediaLocation = "/mnt/media/immich";
};
nginx.virtualHosts."photos.oliverdavies.uk" = {
forceSSL = true;
useACMEHost = "oliverdavies.uk";
locations."/" = {
proxyPass = "http://localhost:${toString config.services.immich.port}";
recommendedProxySettings = true;
};
};
};
environment.systemPackages = with pkgs; [
immich-cli
immich-go
];
};
}

View file

@ -12,6 +12,15 @@
};
}
{
"Immich" = {
href = "https://photos.oliverdavies.uk";
icon = "immich";
description = "Self-hosted photo and video management solution";
siteMonitor = "http://localhost:${toString config.services.immich.port}";
};
}
{
"Audiobookshelf" = {
href = "https://audiobookshelf.oliverdavies.uk";