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,12 +1,13 @@
{ config, lib, ... }:
with lib;
let
common = config.selfhosted.common;
cfg = config.selfhosted.omni-tools;
rootCfg = config.selfhosted;
common = rootCfg.common;
moduleCfg = rootCfg.omni-tools;
in
{
options.selfhosted.omni-tools = {
enable = mkEnableOption "Enable ${cfg.name}";
enable = mkEnableOption "Enable ${moduleCfg.name}";
name = mkOption {
type = types.str;
};
@@ -18,11 +19,11 @@ in
};
};
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
config = mkIf moduleCfg.enable {
virtualisation.oci-containers.containers."${moduleCfg.name}" = {
image = "docker.io/iib0011/omni-tools:0.7.0";
ports = [
"0.0.0.0:${toString cfg.hostHttpPort}:80"
"0.0.0.0:${toString moduleCfg.hostHttpPort}:80"
];
log-driver = "journald";
extraOptions = [
@@ -35,7 +36,7 @@ in
];
};
systemd.services."${common.backend}-${cfg.name}" = {
systemd.services."${common.backend}-${moduleCfg.name}" = {
serviceConfig = {
Restart = lib.mkOverride 90 "always";
};