alyssum/immich: init
Some checks are pending
CI / Build linux-lava for x86_64-linux (push) Waiting to run

This commit is contained in:
Cilly Leang 2026-06-20 18:47:01 +10:00
parent d2fbc73636
commit aab4da94fa
Signed by: cilly
GPG key ID: 6500251E087653C9
5 changed files with 35 additions and 1 deletions

View file

@ -39,7 +39,7 @@
useACMEHost = "lava.moe"; useACMEHost = "lava.moe";
forceSSL = true; forceSSL = true;
locations."/".proxyPass = "http://[${client}]:4533"; locations."/".proxyPass = "http://[${client}]:4533";
listenAddresses = [ "100.67.2.1" ]; listenAddresses = config.me.localAddrs;
}; };
systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ]; systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ];

View file

@ -34,6 +34,7 @@
./filesystem.nix ./filesystem.nix
./kernel.nix ./kernel.nix
./home.syncthing.nix ./home.syncthing.nix
./immich.nix
./networking.nix ./networking.nix
./restic.nix ./restic.nix
./samba.nix ./samba.nix

28
hosts/alyssum/immich.nix Normal file
View file

@ -0,0 +1,28 @@
{ config, ... }: {
services.immich = {
enable = true;
accelerationDevices = null;
settings.server.externalDomain = "https://photos.lava.moe";
};
me.binds."/var/lib/immich" = "immich";
hardware.graphics.enable = true;
users.users.immich.extraGroups = [ "video" "render" ];
services.nginx.virtualHosts."photos.lava.moe" = {
useACMEHost = "lava.moe";
forceSSL = true;
listenAddresses = config.me.localAddrs;
locations."/" = {
proxyPass = "http://[::1]:${toString config.services.immich.port}";
proxyWebsockets = true;
extraConfig = ''
client_max_body_size 50000M;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;
'';
};
};
}

View file

@ -12,4 +12,5 @@
defaultGateway = "192.168.1.1"; defaultGateway = "192.168.1.1";
nameservers = [ "8.8.8.8" "8.8.4.4" ]; nameservers = [ "8.8.8.8" "8.8.4.4" ];
}; };
me.localAddrs = [ "100.67.2.1" ];
} }

View file

@ -49,5 +49,9 @@ in {
type = with lib.types; attrsOf str; type = with lib.types; attrsOf str;
default = {}; default = {};
}; };
localAddrs = lib.mkOption {
type = with lib.types; listOf str;
};
}; };
} }