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
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./converter
|
|
||||||
./docs-manager
|
./docs-manager
|
||||||
./gitea
|
./gitea
|
||||||
./homarr
|
./homarr
|
||||||
./immich
|
./immich
|
||||||
|
./it-tools
|
||||||
./jellyfin
|
./jellyfin
|
||||||
./mihomo
|
./mihomo
|
||||||
./mirotalk
|
./mirotalk
|
||||||
./monitoring
|
./monitoring
|
||||||
./netbird
|
./netbird
|
||||||
|
./omni-tools
|
||||||
./pocket-id
|
./pocket-id
|
||||||
./seafile
|
./seafile
|
||||||
./stalwart
|
./stalwart
|
||||||
|
./transmute
|
||||||
./turn
|
./turn
|
||||||
./vaultwarden
|
./vaultwarden
|
||||||
./zapret2
|
./zapret2
|
||||||
@@ -95,15 +97,6 @@ in
|
|||||||
gid = "1000";
|
gid = "1000";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
converter = {
|
|
||||||
enable = true;
|
|
||||||
targetName = "converter";
|
|
||||||
transmute = {
|
|
||||||
name = "transmute";
|
|
||||||
subdomain = "convert";
|
|
||||||
hostHttpPort = 6010;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
docs-manager = {
|
docs-manager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
targetName = "docs-manager";
|
targetName = "docs-manager";
|
||||||
@@ -167,6 +160,12 @@ in
|
|||||||
user = "immich";
|
user = "immich";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
it-tools = {
|
||||||
|
enable = true;
|
||||||
|
name = "it-tools";
|
||||||
|
subdomain = "it-tools";
|
||||||
|
hostHttpPort = 6040;
|
||||||
|
};
|
||||||
mihomo = {
|
mihomo = {
|
||||||
enable = false;
|
enable = false;
|
||||||
targetName = "mihomo";
|
targetName = "mihomo";
|
||||||
@@ -242,6 +241,12 @@ in
|
|||||||
name = "monitor-node-exporter";
|
name = "monitor-node-exporter";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
omni-tools = {
|
||||||
|
enable = true;
|
||||||
|
name = "omni-tools";
|
||||||
|
subdomain = "omni";
|
||||||
|
hostHttpPort = 6050;
|
||||||
|
};
|
||||||
pocket-id = {
|
pocket-id = {
|
||||||
enable = true;
|
enable = true;
|
||||||
targetName = "pocket-id";
|
targetName = "pocket-id";
|
||||||
@@ -283,6 +288,12 @@ in
|
|||||||
hostHttpPort = 5054;
|
hostHttpPort = 5054;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
transmute = {
|
||||||
|
enable = true;
|
||||||
|
name = "transmute";
|
||||||
|
subdomain = "convert";
|
||||||
|
hostHttpPort = 6010;
|
||||||
|
};
|
||||||
mail = {
|
mail = {
|
||||||
enable = true;
|
enable = true;
|
||||||
targetName = "mail";
|
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, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
rootCfg = config.selfhosted.converter;
|
cfg = config.selfhosted.transmute;
|
||||||
cfg = rootCfg.transmute;
|
|
||||||
domain = "${config.sops.placeholder."domains/serv"}";
|
domain = "${config.sops.placeholder."domains/serv"}";
|
||||||
pocketIdSubdomain = config.selfhosted.pocket-id.subdomain;
|
pocketIdSubdomain = config.selfhosted.pocket-id.subdomain;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = mkIf rootCfg.enable {
|
config = mkIf cfg.enable {
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
"transmute/client_secret" = { };
|
"transmute/client_secret" = { };
|
||||||
};
|
};
|
||||||
+6
-6
@@ -2,14 +2,14 @@
|
|||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
common = config.selfhosted.common;
|
common = config.selfhosted.common;
|
||||||
rootCfg = config.selfhosted.converter;
|
cfg = config.selfhosted.transmute;
|
||||||
cfg = rootCfg.transmute;
|
|
||||||
hostDataPath = "${common.dataDir}/transmute";
|
hostDataPath = "${common.dataDir}/transmute";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./config.nix ];
|
imports = [ ./config.nix ];
|
||||||
|
|
||||||
options.selfhosted.converter.transmute = {
|
options.selfhosted.transmute = {
|
||||||
|
enable = mkEnableOption "Enable ${cfg.name}";
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
@@ -21,7 +21,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf rootCfg.enable {
|
config = mkIf cfg.enable {
|
||||||
virtualisation.oci-containers.containers."${cfg.name}" = {
|
virtualisation.oci-containers.containers."${cfg.name}" = {
|
||||||
image = "ghcr.io/transmute-app/transmute:v2.1.1";
|
image = "ghcr.io/transmute-app/transmute:v2.1.1";
|
||||||
ports = [
|
ports = [
|
||||||
@@ -46,8 +46,8 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = lib.mkOverride 90 "always";
|
Restart = lib.mkOverride 90 "always";
|
||||||
};
|
};
|
||||||
wantedBy = [ "${common.backend}-${rootCfg.targetName}.target" ];
|
wantedBy = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||||
partOf = [ "${common.backend}-${rootCfg.targetName}.target" ];
|
partOf = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||||
preStart = ''
|
preStart = ''
|
||||||
mkdir -p ${hostDataPath}/data
|
mkdir -p ${hostDataPath}/data
|
||||||
chown -R ${common.user.uid}:${common.group.gid} ${hostDataPath}
|
chown -R ${common.user.uid}:${common.group.gid} ${hostDataPath}
|
||||||
Reference in new issue
Block a user