This commit is contained in:
parent
88781bae05
commit
f0f757ea77
2 changed files with 18 additions and 64 deletions
|
@ -11,7 +11,6 @@
|
||||||
gitea-actions-runner.enable = true;
|
gitea-actions-runner.enable = true;
|
||||||
home-assistant.enable = true;
|
home-assistant.enable = true;
|
||||||
homepage-dashboard.enable = true;
|
homepage-dashboard.enable = true;
|
||||||
immich.enable = true;
|
|
||||||
jitsi.enable = true;
|
jitsi.enable = true;
|
||||||
paperless.enable = true;
|
paperless.enable = true;
|
||||||
peertube.enable = true;
|
peertube.enable = true;
|
||||||
|
|
|
@ -1,70 +1,25 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
config,
|
services.immich = {
|
||||||
lib,
|
enable = true;
|
||||||
pkgs,
|
group = "media";
|
||||||
...
|
mediaLocation = "/mnt/media/immich";
|
||||||
}:
|
};
|
||||||
|
|
||||||
with lib;
|
services.nginx.virtualHosts."photos.oliverdavies.uk" = {
|
||||||
|
forceSSL = true;
|
||||||
|
useACMEHost = "oliverdavies.uk";
|
||||||
|
|
||||||
let
|
locations."/" = {
|
||||||
cfg = homelab.services.${service};
|
proxyPass = "http://localhost:${toString config.services.immich.port}";
|
||||||
homelab = config.homelab;
|
proxyWebsockets = true;
|
||||||
service = "immich";
|
recommendedProxySettings = true;
|
||||||
in
|
|
||||||
{
|
|
||||||
options.homelab.services.${service} = {
|
|
||||||
enable = mkEnableOption "Enable ${service}";
|
|
||||||
|
|
||||||
url = mkOption {
|
|
||||||
default = "photos.${homelab.domain}";
|
|
||||||
type = types.str;
|
|
||||||
};
|
|
||||||
|
|
||||||
homepage.name = mkOption {
|
|
||||||
default = "Immich";
|
|
||||||
type = types.str;
|
|
||||||
};
|
|
||||||
|
|
||||||
homepage.description = mkOption {
|
|
||||||
default = "Self-hosted photo and video management solution";
|
|
||||||
type = types.str;
|
|
||||||
};
|
|
||||||
|
|
||||||
homepage.icon = mkOption {
|
|
||||||
default = "immich";
|
|
||||||
type = types.str;
|
|
||||||
};
|
|
||||||
|
|
||||||
homepage.category = mkOption {
|
|
||||||
default = "Media";
|
|
||||||
type = types.str;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
environment.systemPackages = with pkgs; [
|
||||||
services = {
|
immich-cli
|
||||||
${service} = {
|
immich-go
|
||||||
enable = true;
|
];
|
||||||
group = "media";
|
|
||||||
mediaLocation = "/mnt/media/${service}";
|
|
||||||
};
|
|
||||||
|
|
||||||
nginx.virtualHosts."${cfg.url}" = {
|
|
||||||
forceSSL = true;
|
|
||||||
useACMEHost = homelab.domain;
|
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://localhost:${toString config.services.immich.port}";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
recommendedProxySettings = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
immich-cli
|
|
||||||
immich-go
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue