Add photoprism module
This commit is contained in:
parent
544c511341
commit
93ac4b1185
@ -62,6 +62,7 @@
|
||||
headscale.enable = true;
|
||||
matrix-synapse.enable = true;
|
||||
nginx.enable = true;
|
||||
photoprism.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
./services/headscale
|
||||
./services/matrix-synapse
|
||||
./services/nginx
|
||||
./services/photoprism
|
||||
./shell/git
|
||||
./shell/zsh
|
||||
];
|
||||
|
43
modules/services/photoprism/default.nix
Normal file
43
modules/services/photoprism/default.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.modules.services.photoprism;
|
||||
in {
|
||||
options.modules.services.photoprism = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.nginx = {
|
||||
virtualHosts = {
|
||||
"gallery.vimium.com" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/".proxyPass = "http://localhost:${config.services.photoprism.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets."passwords/services/photoprism/admin" = {
|
||||
file = "${inputs.secrets}/passwords/services/photoprism/admin.age";
|
||||
};
|
||||
|
||||
services.photoprism = {
|
||||
enable = true;
|
||||
address = "localhost";
|
||||
passwordFile = config.age.secrets."passwords/services/photoprism/admin".path;
|
||||
settings = {
|
||||
PHOTOPRISM_APP_NAME = "Vimium Gallery";
|
||||
PHOTOPRISM_SITE_AUTHOR = "Vimium";
|
||||
PHOTOPRISM_SITE_TITLE = "Vimium Gallery";
|
||||
PHOTOPRISM_SITE_CAPTION = "See your photos and videos on gallery.vimium.com";
|
||||
PHOTOPRISM_DISABLE_TLS = true;
|
||||
PHOTOPRISM_SPONSOR = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user