From 2aa758ae94d2bc19c9249f364bb6aad71c719c6d Mon Sep 17 00:00:00 2001 From: Constantin Gierczak--Galle Date: Thu, 21 Nov 2024 18:47:17 +0100 Subject: [PATCH] style(photo01): "..." -> "" in module inputs --- machines/photo01/nginx.nix | 2 +- machines/photo01/openssh.nix | 2 +- machines/photo01/photoprism.nix | 87 ++++++++++++++++----------------- 3 files changed, 44 insertions(+), 47 deletions(-) diff --git a/machines/photo01/nginx.nix b/machines/photo01/nginx.nix index a87afd8..c955e54 100644 --- a/machines/photo01/nginx.nix +++ b/machines/photo01/nginx.nix @@ -1,4 +1,4 @@ -{ ... }: +{ }: { diff --git a/machines/photo01/openssh.nix b/machines/photo01/openssh.nix index c60bd67..ffdc319 100644 --- a/machines/photo01/openssh.nix +++ b/machines/photo01/openssh.nix @@ -1,4 +1,4 @@ -{ ... }: +{ _ }: { services.openssh = { diff --git a/machines/photo01/photoprism.nix b/machines/photo01/photoprism.nix index 7464a49..e0a7139 100644 --- a/machines/photo01/photoprism.nix +++ b/machines/photo01/photoprism.nix @@ -1,57 +1,54 @@ { pkgs, ... }: -let - port = 2342; -in { services = { photoprism = { - enable = true; - port = port; - settings = { - PHOTOPRISM_DEFAULT_LOCALE = "fr"; - PHOTOPRISM_ADMIN_USERNAME = "admin"; - PHOHOPRISM_SITE_URL = "https://photoprism.cgiga.fr"; - PHOTOPRISM_SITE_CAPTION = "PhotoPrism"; + enable = true; + port = 2342; + settings = { + PHOTOPRISM_DEFAULT_LOCALE = "fr"; + PHOTOPRISM_ADMIN_USERNAME = "admin"; + PHOHOPRISM_SITE_URL = "https://photoprism.cgiga.fr"; + 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"; + # 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"; + + address = "localhost"; + + #importPath = "/photoprism/imports"; + passwordFile = "/passwords/photoprism"; }; - originalsPath = "/data/photos"; + mysql = { + enable = true; + dataDir = "/data/mysql"; + package = pkgs.mariadb; + ensureDatabases = [ "photoprism" ]; + ensureUsers = [ + { + name = "photoprism"; + ensurePermissions = { + "photoprism.*" = "ALL PRIVILEGES"; + }; + } + ]; + }; - address = "localhost"; - - #importPath = "/photoprism/imports"; - passwordFile = "/passwords/photoprism"; - }; - - mysql = { - enable = true; - dataDir = "/data/mysql"; - package = pkgs.mariadb; - ensureDatabases = [ "photoprism" ]; - ensureUsers = [ - { - name = "photoprism"; - ensurePermissions = { - "photoprism.*" = "ALL PRIVILEGES"; - }; - } - ]; - }; - - services.nginx.virtualHosts."photoprism.cgiga.fr" = { - enableACME = true; - forceSSL = true; - serverAliases = [ ]; - locations."/" = { - proxyPass = "http://localhost:${toString port}/"; - proxyWebsockets = true; + services.nginx.virtualHosts."photoprism.cgiga.fr" = { + enableACME = true; + forceSSL = true; + serverAliases = [ ]; + locations."/" = { + proxyPass = "http://localhost:${toString port}/"; + proxyWebsockets = true; + }; }; }; -}; }