Compare commits

...

3 Commits

Author SHA1 Message Date
2b021cc0a4
Remove some unstable emulators 2024-03-31 19:46:54 +01:00
93ac4b1185
Add photoprism module 2024-03-31 19:46:37 +01:00
544c511341
flake.lock: Update
Flake lock file updates:

• Updated input 'secrets':
    'git+ssh://git@git.vimium.com/jordan/nix-secrets.git?ref=refs/heads/master&rev=d135b4d6d5f0079999188895f8b5f35e821b0d4b' (2024-03-03)
  → 'git+ssh://git@git.vimium.com/jordan/nix-secrets.git?ref=refs/heads/master&rev=b64a65c725e4cb63811fca53b60073d4c47802e4' (2024-03-31)
2024-03-31 19:45:50 +01:00
5 changed files with 53 additions and 8 deletions

8
flake.lock generated
View File

@ -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"
}, },

View File

@ -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;
}; };
}; };

View File

@ -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
]; ];

View File

@ -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)
]; ];
}; };
} }

View 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;
};
};
};
}