Compare commits
No commits in common. "eeccafbe82d3fda0a2f016736f12c5caf463e3af" and "9a153603ee8e37e41e09474c45925f684def7934" have entirely different histories.
eeccafbe82
...
9a153603ee
3 changed files with 13 additions and 40 deletions
|
@ -62,17 +62,14 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# NOTE: for now, we use internal ports
|
||||||
# TODO: switch to unixsockets if supported
|
# TODO: switch to unixsockets if supported
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedTlsSettings = true;
|
|
||||||
recommendedOptimisation = true;
|
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
recommendedProxySettings = true;
|
|
||||||
clientMaxBodySize = "500m";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
trusted-users = [ "@wheel" "root" "nix-ssh" ];
|
trusted-users = [ "@wheel" "root" "nix-ssh" ];
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
|
|
12
flake.lock
12
flake.lock
|
@ -34,11 +34,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730190761,
|
"lastModified": 1728334376,
|
||||||
"narHash": "sha256-o5m5WzvY6cGIDupuOvjgNSS8AN6yP2iI9MtUC6q/uos=",
|
"narHash": "sha256-CTKEKPzD/j8FK6H4DO3EjyixZd3HHvgAgfnCwpGFP5c=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "3979285062d6781525cded0f6c4ff92e71376b55",
|
"rev": "d39ee334984fcdae6244f5a8e6ab857479cbaefe",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -83,11 +83,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730531603,
|
"lastModified": 1728241625,
|
||||||
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
|
"narHash": "sha256-yumd4fBc/hi8a9QgA9IT8vlQuLZ2oqhkJXHPKxH/tRw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
|
"rev": "c31898adf5a8ed202ce5bea9f347b1c6871f32d1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,52 +1,28 @@
|
||||||
{ lib, modulesPath, pkgs, ... }:
|
{ lib, modulesPath, ... }:
|
||||||
|
|
||||||
let port = 2342;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
services.photoprism = {
|
services.photoprism = {
|
||||||
enable = true;
|
enable = true;
|
||||||
port = port;
|
port = 2342;
|
||||||
settings = {
|
settings = {
|
||||||
PHOTOPRISM_DEFAULT_LOCALE = "fr";
|
PHOTOPRISM_DEFAULT_LOCALE = "fr";
|
||||||
PHOTOPRISM_ADMIN_USERNAME = "admin";
|
PHOTOPRISM_ADMIN_USERNAME = "admin";
|
||||||
PHOHOPRISM_SITE_URL = "https://photoprism.cgiga.fr";
|
PHOHOPRISM_SITE_URL = "https://photoprism.cgiga.fr";
|
||||||
PHOTOPRISM_SITE_CAPTION = "PhotoPrism";
|
PHOTOPRISM_SITE_CAPTION = "PhotoPrism";
|
||||||
|
|
||||||
# DB access config
|
|
||||||
PHOTOPRISM_DATABASE_DRIVER = "mysql";
|
|
||||||
PHOTOPRISM_DATABASE_NAME = "photoprism";
|
|
||||||
PHOTOPRISM_DATABASE_SERVER = "/run/mysqld/mysqld.sock";
|
|
||||||
PHOTOPRISM_DATABASE_USER = "photoprism";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
originalsPath = "/data/photos";
|
originalsPath = "/data/photos";
|
||||||
|
#importPath = "/photoprism/imports";
|
||||||
|
|
||||||
address = "localhost";
|
address = "localhost";
|
||||||
|
|
||||||
#importPath = "/photoprism/imports";
|
#passwordFile = "/passwords/photoprism";
|
||||||
passwordFile = "/passwords/photoprism";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.mysql = {
|
|
||||||
enable = true;
|
|
||||||
dataDir = "/data/mysql";
|
|
||||||
package = pkgs.mariadb;
|
|
||||||
ensureDatabases = [ "photoprism" ];
|
|
||||||
ensureUsers = [{
|
|
||||||
name = "photoprism";
|
|
||||||
ensurePermissions = {
|
|
||||||
"photoprism.*" = "ALL PRIVILEGES";
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."photoprism.cgiga.fr" = {
|
services.nginx.virtualHosts."photoprism.cgiga.fr" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
serverAliases = [];
|
serverAliases = [];
|
||||||
locations."/" = {
|
locations."/".proxyPass = "http://localhost:2342/";
|
||||||
proxyPass = "http://localhost:${toString port}/";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue