Small modules config restructure
Changed variables names in every module
This commit is contained in:
1 parent
c1d2e52bf8
commit
c92b90e406
83 files changed
+616
-523
No files matched your search
@@ -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";
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user