Compare commits
3 Commits
bffc9ba70d
...
2b021cc0a4
Author | SHA1 | Date | |
---|---|---|---|
2b021cc0a4 | |||
93ac4b1185 | |||
544c511341 |
8
flake.lock
generated
8
flake.lock
generated
@ -251,11 +251,11 @@
|
|||||||
"secrets": {
|
"secrets": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709495020,
|
"lastModified": 1711910722,
|
||||||
"narHash": "sha256-eiz0qUjUbdeb6m28XPY7OVnrGMZ45JiT2dZZ0Bmq2X0=",
|
"narHash": "sha256-QrXfLiCYVQXD18rkmrJPTJYhjoP+DsDhJlPRtWIEg/o=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "d135b4d6d5f0079999188895f8b5f35e821b0d4b",
|
"rev": "b64a65c725e4cb63811fca53b60073d4c47802e4",
|
||||||
"revCount": 14,
|
"revCount": 15,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
||||||
},
|
},
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
headscale.enable = true;
|
headscale.enable = true;
|
||||||
matrix-synapse.enable = true;
|
matrix-synapse.enable = true;
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
|
photoprism.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
./services/headscale
|
./services/headscale
|
||||||
./services/matrix-synapse
|
./services/matrix-synapse
|
||||||
./services/nginx
|
./services/nginx
|
||||||
|
./services/photoprism
|
||||||
./shell/git
|
./shell/git
|
||||||
./shell/zsh
|
./shell/zsh
|
||||||
];
|
];
|
||||||
|
@ -54,11 +54,11 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
user.packages = with pkgs.unstable; [
|
user.packages = with pkgs; [
|
||||||
(lib.mkIf cfg.ps1.enable duckstation)
|
(lib.mkIf cfg.ps1.enable duckstation)
|
||||||
(lib.mkIf cfg.ps2.enable pcsx2)
|
(lib.mkIf cfg.ps2.enable unstable.pcsx2)
|
||||||
(lib.mkIf cfg.ps3.enable rpcs3)
|
(lib.mkIf cfg.ps3.enable rpcs3)
|
||||||
(lib.mkIf cfg.psp.enable ppsspp)
|
(lib.mkIf cfg.psp.enable unstable.ppsspp)
|
||||||
(lib.mkIf cfg.ds.enable desmume)
|
(lib.mkIf cfg.ds.enable desmume)
|
||||||
(lib.mkIf (cfg.gba.enable ||
|
(lib.mkIf (cfg.gba.enable ||
|
||||||
cfg.gb.enable ||
|
cfg.gb.enable ||
|
||||||
@ -68,7 +68,7 @@ in {
|
|||||||
(lib.mkIf (cfg.wii.enable ||
|
(lib.mkIf (cfg.wii.enable ||
|
||||||
cfg.gamecube.enable)
|
cfg.gamecube.enable)
|
||||||
dolphin-emu)
|
dolphin-emu)
|
||||||
(lib.mkIf cfg.xbox.enable xemu)
|
(lib.mkIf cfg.xbox.enable unstable.xemu)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
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