Add photoprism properly
This commit is contained in:
parent
b2b1df3cda
commit
5c5daa49b7
18
flake.lock
18
flake.lock
|
@ -167,11 +167,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725716377,
|
"lastModified": 1725885300,
|
||||||
"narHash": "sha256-7NzW9O/cAw7iWzRfh7Oo/SuSudL4a1YTKS6yoh3tMck=",
|
"narHash": "sha256-5RLEnou1/GJQl+Wd+Bxaj7QY7FFQ9wjnFq1VNEaxTmc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "04a1cda0c1725094a4db703cccbb956b7558f5a6",
|
"rev": "166dee4f88a7e3ba1b7a243edb1aca822f00680e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -298,11 +298,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725693463,
|
"lastModified": 1725826545,
|
||||||
"narHash": "sha256-ZPzhebbWBOr0zRWW10FfqfbJlan3G96/h3uqhiFqmwg=",
|
"narHash": "sha256-L64N1rpLlXdc94H+F6scnrbuEu+utC03cDDVvvJGOME=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "68e7dce0a6532e876980764167ad158174402c6f",
|
"rev": "f4c846aee8e1e29062aa8514d5e0ab270f4ec2f9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -314,11 +314,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725854666,
|
"lastModified": 1725914786,
|
||||||
"narHash": "sha256-Peccz5solKBUlGtN5vfWHxbd0Mxks+feh1TU/A7hZTg=",
|
"narHash": "sha256-IUEPseZohbNJi9eFFWUhTnkpceZLMj0B62TtCkLo2ZY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "4448858f13f127db4c8055e2bf6fe6e1257ba8ea",
|
"rev": "b121603cbc4551eda8c055bae01d08e9ecedb529",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -86,6 +86,11 @@
|
||||||
fsType = "none";
|
fsType = "none";
|
||||||
options = [ "bind" ];
|
options = [ "bind" ];
|
||||||
};
|
};
|
||||||
|
"/var/lib/private/photoprism/originals" = {
|
||||||
|
device = "/export/JimboNFS/Photos/Galleries";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{ device = "/dev/disk/by-uuid/ec422cad-bf93-4b15-b989-2c807f1073a4"; }
|
{ device = "/dev/disk/by-uuid/ec422cad-bf93-4b15-b989-2c807f1073a4"; }
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
./server/nfs.nix
|
./server/nfs.nix
|
||||||
./server/nginx.nix
|
./server/nginx.nix
|
||||||
./server/owncast.nix
|
./server/owncast.nix
|
||||||
|
./server/photoprism.nix
|
||||||
#./server/pixelfed.nix
|
#./server/pixelfed.nix
|
||||||
./server/minecraft
|
./server/minecraft
|
||||||
./server/vaultwarden.nix
|
./server/vaultwarden.nix
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.mariadb;
|
package = pkgs.mariadb;
|
||||||
dataDir = "/var/lib/mysql";
|
dataDir = "/var/lib/mysql";
|
||||||
initialDatabases = [
|
ensureDatabases = [
|
||||||
{ name = "minecraft"; }
|
"minecraft"
|
||||||
|
"photoprism"
|
||||||
];
|
];
|
||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
|
@ -13,6 +14,12 @@
|
||||||
"minecraft.*" = "ALL PRIVILEGES";
|
"minecraft.*" = "ALL PRIVILEGES";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "photoprism";
|
||||||
|
ensurePermissions = {
|
||||||
|
"photoprism.*" = "ALL PRIVILEGES";
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
30
nixos/server/photoprism.nix
Normal file
30
nixos/server/photoprism.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{outputs, ...}: {
|
||||||
|
# Photoprism
|
||||||
|
services = {
|
||||||
|
photoprism = {
|
||||||
|
enable = true;
|
||||||
|
port = 2342;
|
||||||
|
originalsPath = "/var/lib/private/photoprism/originals";
|
||||||
|
address = "0.0.0.0";
|
||||||
|
settings = {
|
||||||
|
PHOTOPRISM_ADMIN_USER = "jimbo";
|
||||||
|
PHOTOPRISM_ADMIN_PASSWORD = "${outputs.secrets.prismAdminPass}";
|
||||||
|
PHOTOPRISM_DEFAULT_LOCALE = "en";
|
||||||
|
PHOTOPRISM_DATABASE_DRIVER = "mysql";
|
||||||
|
PHOTOPRISM_DATABASE_NAME = "photoprism";
|
||||||
|
PHOTOPRISM_DATABASE_SERVER = "/run/mysqld/mysqld.sock";
|
||||||
|
PHOTOPRISM_DATABASE_USER = "photoprism";
|
||||||
|
PHOTOPRISM_SITE_URL = "https://gallery.${outputs.secrets.jimDomain}";
|
||||||
|
PHOTOPRISM_SITE_TITLE = "Jimbo's PhotoPrism";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nginx.virtualHosts."gallery.${outputs.secrets.jimDomain}" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:2342";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -25,10 +25,6 @@ in {
|
||||||
publicKey = outputs.secrets.wirePixel9Pub;
|
publicKey = outputs.secrets.wirePixel9Pub;
|
||||||
allowedIPs = [ "10.100.0.2/32" ];
|
allowedIPs = [ "10.100.0.2/32" ];
|
||||||
}
|
}
|
||||||
{ # Jimbo Pixel 4
|
|
||||||
publicKey = outputs.secrets.wirePixel4Pub;
|
|
||||||
allowedIPs = [ "10.100.0.3/32" ];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
BIN
secrets.nix
BIN
secrets.nix
Binary file not shown.
Loading…
Reference in a new issue