Fix immich
This commit is contained in:
parent
e1c30789a2
commit
0bba7ff4f8
4 changed files with 47 additions and 13 deletions
|
@ -17,6 +17,7 @@
|
||||||
core.openssh.enable = true;
|
core.openssh.enable = true;
|
||||||
cli.podman.enable = true;
|
cli.podman.enable = true;
|
||||||
desktop.dconf.enable = true;
|
desktop.dconf.enable = true;
|
||||||
|
homelab.immich.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.logind.lidSwitchExternalPower = "ignore";
|
services.logind.lidSwitchExternalPower = "ignore";
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
"luke.oliverdavies.uk"
|
"luke.oliverdavies.uk"
|
||||||
"nixedo.oliverdavies.uk"
|
"nixedo.oliverdavies.uk"
|
||||||
"paperless.oliverdavies.uk"
|
"paperless.oliverdavies.uk"
|
||||||
|
"photos.oliverdavies.uk"
|
||||||
"phpsw-sculpin-demo.oliverdavies.uk"
|
"phpsw-sculpin-demo.oliverdavies.uk"
|
||||||
"rebuilding-acquia.oliverdavies.uk"
|
"rebuilding-acquia.oliverdavies.uk"
|
||||||
"rebuilding-bartik.oliverdavies.uk"
|
"rebuilding-bartik.oliverdavies.uk"
|
||||||
|
|
|
@ -1,19 +1,42 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
services = {
|
config,
|
||||||
immich = {
|
lib,
|
||||||
enable = true;
|
pkgs,
|
||||||
group = "media";
|
...
|
||||||
mediaLocation = "/mnt/media/immich";
|
}:
|
||||||
};
|
|
||||||
|
|
||||||
caddy.virtualHosts."immich.oliverdavies.uk" = {
|
with lib;
|
||||||
useACMEHost = "oliverdavies.uk";
|
|
||||||
|
|
||||||
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
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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" = {
|
"Audiobookshelf" = {
|
||||||
href = "https://audiobookshelf.oliverdavies.uk";
|
href = "https://audiobookshelf.oliverdavies.uk";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue