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,10 +1,10 @@
{ 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-db.env".content = ''
MYSQL_ROOT_PASSWORD=${config.sops.placeholder."seafile/mysql_password"}
MYSQL_LOG_CONSOLE=true
@@ -1,9 +1,10 @@
{ config, lib, ... }:
with lib;
let
common = config.selfhosted.common;
rootCfg = config.selfhosted.seafile;
cfg = rootCfg.mariadb;
rootCfg = config.selfhosted;
common = rootCfg.common;
moduleCfg = rootCfg.seafile;
cfg = moduleCfg.mariadb;
hostDataPath = "${common.dataDir}/seafile";
in
{
@@ -15,7 +16,7 @@ in
};
};
config = mkIf rootCfg.enable {
config = mkIf moduleCfg.enable {
virtualisation.oci-containers.containers.${cfg.name} = {
image = "docker.io/mariadb:10.11";
environmentFiles = [ config.sops.templates."seafile-db.env".path ];
@@ -37,8 +38,8 @@ 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" ];
preStart = ''
mkdir -p ${hostDataPath}/mysql
'';