Add photoprism
This commit is contained in:
parent
fb6533dea0
commit
49eba2202c
4 changed files with 47 additions and 0 deletions
|
@ -88,6 +88,7 @@
|
|||
./modules/vaultwarden.nix
|
||||
./modules/hledger.nix
|
||||
./modules/etesync.nix
|
||||
./modules/photoprism.nix
|
||||
|
||||
# Host-specific config
|
||||
nixos-hardware.nixosModules.raspberry-pi-4
|
||||
|
|
BIN
hosts/hermes/secrets/photoprism.age
Normal file
BIN
hosts/hermes/secrets/photoprism.age
Normal file
Binary file not shown.
|
@ -19,4 +19,5 @@ in
|
|||
"gandalf_mail.age".publicKeys = [ ageKey ];
|
||||
"nginx.age".publicKeys = [ ageKey ];
|
||||
"etebase.age".publicKeys = [ ageKey ];
|
||||
"photoprism.age".publicKeys = [ ageKey ];
|
||||
}
|
||||
|
|
45
modules/photoprism.nix
Normal file
45
modules/photoprism.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ ... }:
|
||||
{
|
||||
systemd.tmpfiles.rules = [
|
||||
"f /run/agenix/photoprism 0770 photoprism photoprism -"
|
||||
];
|
||||
|
||||
services = {
|
||||
photoprism = {
|
||||
enable = true;
|
||||
port = 2342;
|
||||
address = "photo.bhankas.org";
|
||||
passwordFile = "/run/agenix/photoprism";
|
||||
settings = {
|
||||
PHOTOPRISM_ADMIN_USER = "root";
|
||||
};
|
||||
};
|
||||
|
||||
nginx = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"photo.bhankas.org" = {
|
||||
addSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:2342";
|
||||
proxyWebsockets = false;
|
||||
extraConfig =
|
||||
"proxy_set_header Host $host;\n"
|
||||
;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
certs = {
|
||||
"photo.bhankas.org" = {
|
||||
email = "admin@bhankas.org";
|
||||
dnsResolver = "1.1.1.1:53";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in a new issue