Add omni- and it- tools;
This commit is contained in:
1 parent
a459f9cc57
commit
5f231b86cb
6 files changed
+121
-46
No files matched your search
@@ -1,27 +0,0 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
common = config.selfhosted.common;
|
||||
cfg = config.selfhosted.converter;
|
||||
in
|
||||
{
|
||||
imports = [ ./transmute ];
|
||||
|
||||
options.selfhosted.converter = {
|
||||
enable = mkEnableOption "Enable ${cfg.targetName} root target";
|
||||
targetName = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.targets."${common.backend}-${cfg.targetName}" = {
|
||||
unitConfig = {
|
||||
Description = "Root target for ${cfg.targetName}";
|
||||
};
|
||||
wantedBy = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||
partOf = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||
after = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -11,19 +11,21 @@ let
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./converter
|
||||
./docs-manager
|
||||
./gitea
|
||||
./homarr
|
||||
./immich
|
||||
./it-tools
|
||||
./jellyfin
|
||||
./mihomo
|
||||
./mirotalk
|
||||
./monitoring
|
||||
./netbird
|
||||
./omni-tools
|
||||
./pocket-id
|
||||
./seafile
|
||||
./stalwart
|
||||
./transmute
|
||||
./turn
|
||||
./vaultwarden
|
||||
./zapret2
|
||||
@@ -95,15 +97,6 @@ in
|
||||
gid = "1000";
|
||||
};
|
||||
};
|
||||
converter = {
|
||||
enable = true;
|
||||
targetName = "converter";
|
||||
transmute = {
|
||||
name = "transmute";
|
||||
subdomain = "convert";
|
||||
hostHttpPort = 6010;
|
||||
};
|
||||
};
|
||||
docs-manager = {
|
||||
enable = true;
|
||||
targetName = "docs-manager";
|
||||
@@ -167,6 +160,12 @@ in
|
||||
user = "immich";
|
||||
};
|
||||
};
|
||||
it-tools = {
|
||||
enable = true;
|
||||
name = "it-tools";
|
||||
subdomain = "it-tools";
|
||||
hostHttpPort = 6040;
|
||||
};
|
||||
mihomo = {
|
||||
enable = false;
|
||||
targetName = "mihomo";
|
||||
@@ -242,6 +241,12 @@ in
|
||||
name = "monitor-node-exporter";
|
||||
};
|
||||
};
|
||||
omni-tools = {
|
||||
enable = true;
|
||||
name = "omni-tools";
|
||||
subdomain = "omni";
|
||||
hostHttpPort = 6050;
|
||||
};
|
||||
pocket-id = {
|
||||
enable = true;
|
||||
targetName = "pocket-id";
|
||||
@@ -283,6 +288,12 @@ in
|
||||
hostHttpPort = 5054;
|
||||
};
|
||||
};
|
||||
transmute = {
|
||||
enable = true;
|
||||
name = "transmute";
|
||||
subdomain = "convert";
|
||||
hostHttpPort = 6010;
|
||||
};
|
||||
mail = {
|
||||
enable = true;
|
||||
targetName = "mail";
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
common = config.selfhosted.common;
|
||||
cfg = config.selfhosted.it-tools;
|
||||
in
|
||||
{
|
||||
options.selfhosted.it-tools = {
|
||||
enable = mkEnableOption "Enable ${cfg.name}";
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
subdomain = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
hostHttpPort = mkOption {
|
||||
type = types.port;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.oci-containers.containers."${cfg.name}" = {
|
||||
image = "docker.io/sharevb/it-tools:2026.10.25";
|
||||
ports = [
|
||||
"0.0.0.0:${toString cfg.hostHttpPort}:8080"
|
||||
];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network=${common.network.name}"
|
||||
"--health-cmd=wget -q -O /dev/null --tries=1 http://127.0.0.1:8080/"
|
||||
"--health-interval=30s"
|
||||
"--health-timeout=10s"
|
||||
"--health-retries=3"
|
||||
"--health-start-period=20s"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services."${common.backend}-${cfg.name}" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
};
|
||||
wantedBy = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||
partOf = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
common = config.selfhosted.common;
|
||||
cfg = config.selfhosted.omni-tools;
|
||||
in
|
||||
{
|
||||
options.selfhosted.omni-tools = {
|
||||
enable = mkEnableOption "Enable ${cfg.name}";
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
subdomain = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
hostHttpPort = mkOption {
|
||||
type = types.port;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.oci-containers.containers."${cfg.name}" = {
|
||||
image = "docker.io/iib0011/omni-tools:0.7.0";
|
||||
ports = [
|
||||
"0.0.0.0:${toString cfg.hostHttpPort}:80"
|
||||
];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network=${common.network.name}"
|
||||
"--health-cmd=wget -q -O /dev/null --tries=1 http://127.0.0.1/"
|
||||
"--health-interval=30s"
|
||||
"--health-timeout=10s"
|
||||
"--health-retries=3"
|
||||
"--health-start-period=20s"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services."${common.backend}-${cfg.name}" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
};
|
||||
wantedBy = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||
partOf = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
+2
-3
@@ -1,13 +1,12 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
rootCfg = config.selfhosted.converter;
|
||||
cfg = rootCfg.transmute;
|
||||
cfg = config.selfhosted.transmute;
|
||||
domain = "${config.sops.placeholder."domains/serv"}";
|
||||
pocketIdSubdomain = config.selfhosted.pocket-id.subdomain;
|
||||
in
|
||||
{
|
||||
config = mkIf rootCfg.enable {
|
||||
config = mkIf cfg.enable {
|
||||
sops.secrets = {
|
||||
"transmute/client_secret" = { };
|
||||
};
|
||||
+6
-6
@@ -2,14 +2,14 @@
|
||||
with lib;
|
||||
let
|
||||
common = config.selfhosted.common;
|
||||
rootCfg = config.selfhosted.converter;
|
||||
cfg = rootCfg.transmute;
|
||||
cfg = config.selfhosted.transmute;
|
||||
hostDataPath = "${common.dataDir}/transmute";
|
||||
in
|
||||
{
|
||||
imports = [ ./config.nix ];
|
||||
|
||||
options.selfhosted.converter.transmute = {
|
||||
options.selfhosted.transmute = {
|
||||
enable = mkEnableOption "Enable ${cfg.name}";
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
@@ -21,7 +21,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf rootCfg.enable {
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.oci-containers.containers."${cfg.name}" = {
|
||||
image = "ghcr.io/transmute-app/transmute:v2.1.1";
|
||||
ports = [
|
||||
@@ -46,8 +46,8 @@ in
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
};
|
||||
wantedBy = [ "${common.backend}-${rootCfg.targetName}.target" ];
|
||||
partOf = [ "${common.backend}-${rootCfg.targetName}.target" ];
|
||||
wantedBy = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||
partOf = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||
preStart = ''
|
||||
mkdir -p ${hostDataPath}/data
|
||||
chown -R ${common.user.uid}:${common.group.gid} ${hostDataPath}
|
||||
Reference in new issue
Block a user