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,18 +1,19 @@
{ config, lib, ... }:
with lib;
let
cfg = config.selfhosted.transmute;
rootCfg = config.selfhosted;
moduleCfg = rootCfg.transmute;
domain = "${config.sops.placeholder."domains/serv"}";
pocketIdSubdomain = config.selfhosted.pocket-id.subdomain;
pocketIdSubdomain = rootCfg.pocket-id.subdomain;
in
{
config = mkIf cfg.enable {
config = mkIf moduleCfg.enable {
sops.secrets = {
"transmute/client_secret" = { };
};
sops.templates."transmute.env".content = ''
APP_URL=https://${cfg.subdomain}.${domain}
APP_URL=https://${moduleCfg.subdomain}.${domain}
OIDC_AUTO_LAUNCH=false
OIDC_ISSUER_URL=https://${pocketIdSubdomain}.${domain}
OIDC_CLIENT_ID=transmute
@@ -1,15 +1,16 @@
{ config, lib, ... }:
with lib;
let
common = config.selfhosted.common;
cfg = config.selfhosted.transmute;
rootCfg = config.selfhosted;
common = rootCfg.common;
moduleCfg = rootCfg.transmute;
hostDataPath = "${common.dataDir}/transmute";
in
{
imports = [ ./config.nix ];
options.selfhosted.transmute = {
enable = mkEnableOption "Enable ${cfg.name}";
enable = mkEnableOption "Enable ${moduleCfg.name}";
name = mkOption {
type = types.str;
};
@@ -21,11 +22,11 @@ in
};
};
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
config = mkIf moduleCfg.enable {
virtualisation.oci-containers.containers."${moduleCfg.name}" = {
image = "ghcr.io/transmute-app/transmute:v2.1.1";
ports = [
"0.0.0.0:${toString cfg.hostHttpPort}:3313"
"0.0.0.0:${toString moduleCfg.hostHttpPort}:3313"
];
environmentFiles = [ config.sops.templates."transmute.env".path ];
volumes = [
@@ -42,7 +43,7 @@ in
];
};
systemd.services."${common.backend}-${cfg.name}" = {
systemd.services."${common.backend}-${moduleCfg.name}" = {
serviceConfig = {
Restart = lib.mkOverride 90 "always";
};