Small modules config restructure

Changed variables names in every module
This commit is contained in:
aloslider committed 2026-10-31 19:48:50 +03:00
1 parent c1d2e52bf8
commit c92b90e406
83 files changed
+616 -523

No files matched your search

@@ -1,13 +1,13 @@
{ config, lib, ... }:
with lib;
let
rootCfg = config.selfhosted.seafile;
moduleCfg = config.selfhosted.seafile;
in
{
config = mkIf rootCfg.enable {
config = mkIf moduleCfg.enable {
sops.templates."seafile-thumbnail.env".content = ''
TIME_ZONE=${config.time.timeZone}
SEAFILE_MYSQL_DB_HOST=${rootCfg.mariadb.name}
SEAFILE_MYSQL_DB_HOST=${moduleCfg.mariadb.name}
SEAFILE_MYSQL_DB_PORT=3306
SEAFILE_MYSQL_DB_USER=seafile
SEAFILE_MYSQL_DB_PASSWORD=${config.sops.placeholder."seafile/mysql_password"}
@@ -17,7 +17,7 @@ in
JWT_PRIVATE_KEY=${config.sops.placeholder."seafile/jwt_private_key"}
SEAFILE_LOG_TO_STDOUT=false
SITE_ROOT=/
INNER_SEAHUB_SERVICE_URL=http://${rootCfg.server.name}
INNER_SEAHUB_SERVICE_URL=http://${moduleCfg.server.name}
THUMBNAIL_IMAGE_ORIGINAL_SIZE_LIMIT=256
SEAF_SERVER_STORAGE_TYPE=disk
'';
@@ -1,9 +1,10 @@
{ config, lib, ... }:
with lib;
let
common = config.selfhosted.common;
rootCfg = config.selfhosted.seafile;
cfg = rootCfg.thumbnail;
rootCfg = config.selfhosted;
common = rootCfg.common;
moduleCfg = rootCfg.seafile;
cfg = moduleCfg.thumbnail;
hostDataPath = "${common.dataDir}/seafile";
in
{
@@ -18,7 +19,7 @@ in
};
};
config = mkIf rootCfg.enable {
config = mkIf moduleCfg.enable {
virtualisation.oci-containers.containers.${cfg.name} = {
image = "docker.io/seafileltd/thumbnail-server:13.0.20";
ports = [
@@ -38,15 +39,15 @@ in
serviceConfig = {
Restart = lib.mkOverride 90 "always";
};
wantedBy = [ "${common.backend}-${rootCfg.targetName}.target" ];
partOf = [ "${common.backend}-${rootCfg.targetName}.target" ];
wantedBy = [ "${common.backend}-${moduleCfg.targetName}.target" ];
partOf = [ "${common.backend}-${moduleCfg.targetName}.target" ];
requires = [
"${common.backend}-${rootCfg.mariadb.name}.service"
"${common.backend}-${rootCfg.server.name}.service"
"${common.backend}-${moduleCfg.mariadb.name}.service"
"${common.backend}-${moduleCfg.server.name}.service"
];
after = [
"${common.backend}-${rootCfg.mariadb.name}.service"
"${common.backend}-${rootCfg.server.name}.service"
"${common.backend}-${moduleCfg.mariadb.name}.service"
"${common.backend}-${moduleCfg.server.name}.service"
];
};
};