initial work on iu + more compose refactoring
This commit is contained in:
1 parent
4f716499c9
commit
1e8cf01461
6 files changed
+82
-12
No files matched your search
+2
-4
@@ -225,10 +225,8 @@ in
|
||||
PUID = "1000";
|
||||
PGID = "100";
|
||||
};
|
||||
extraConfig = {
|
||||
shm_size = "1g";
|
||||
extra_hosts = [ "host.docker.internal:host-gateway" ];
|
||||
};
|
||||
shm_size = "1g";
|
||||
extra_hosts = [ "host.docker.internal:host-gateway" ];
|
||||
};
|
||||
};
|
||||
# Signal CLI
|
||||
|
||||
+36
-2
@@ -1,9 +1,12 @@
|
||||
{ ... }:
|
||||
{ config, ... }:
|
||||
let
|
||||
ports = {
|
||||
audiobookshelf = 8000;
|
||||
nixServe = 5000;
|
||||
dockerRegistry = 5001;
|
||||
postgres = 5432;
|
||||
ssh = 22;
|
||||
iu = 1947;
|
||||
};
|
||||
gitea = {
|
||||
user = "gitea";
|
||||
@@ -18,7 +21,9 @@ let
|
||||
ports.audiobookshelf
|
||||
gitea.sshPort
|
||||
gitea.httpPort
|
||||
22
|
||||
ports.postgres
|
||||
ports.ssh
|
||||
ports.iu
|
||||
];
|
||||
in
|
||||
{
|
||||
@@ -88,6 +93,35 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
skyg.nixos.common.container-services.iu = {
|
||||
services = {
|
||||
db = {
|
||||
image = "postgres:18";
|
||||
ports = [
|
||||
"${toString ports.postgres}:5432"
|
||||
];
|
||||
volumes = [
|
||||
"/var/lib/iu:/opt/data"
|
||||
];
|
||||
environmentFiles = [ config.age.secrets.iu-project.path ];
|
||||
networks = [ "main" ];
|
||||
};
|
||||
iu = {
|
||||
image = "minipc1.lab.internal:5001/iu:2026.07.12-ac2c604";
|
||||
ports = [
|
||||
"${toString ports.iu}:1947"
|
||||
];
|
||||
volumes = [
|
||||
];
|
||||
environmentFiles = [
|
||||
];
|
||||
networks = [
|
||||
"main"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Certbot TLS service
|
||||
skyg.server.dns.certbot = {
|
||||
enable = false;
|
||||
|
||||
@@ -67,10 +67,7 @@
|
||||
"scrypted-nvr:/nvr"
|
||||
];
|
||||
environment.SCRYPTED_NVR_VOLUME = "/nvr";
|
||||
extraConfig = {
|
||||
network_mode = "host";
|
||||
networks = [ ];
|
||||
};
|
||||
network_mode = "host";
|
||||
};
|
||||
volumes = {
|
||||
scrypted-nvr = {
|
||||
|
||||
@@ -39,6 +39,15 @@ rec {
|
||||
// lib.optionalAttrs (svcCfg.deploy != { }) {
|
||||
deploy = svcCfg.deploy;
|
||||
}
|
||||
// lib.optionalAttrs (svcCfg.extra_hosts != [ ]) {
|
||||
extra_hosts = svcCfg.extra_hosts;
|
||||
}
|
||||
// lib.optionalAttrs (svcCfg.shm_size != null) {
|
||||
shm_size = svcCfg.shm_size;
|
||||
}
|
||||
// lib.optionalAttrs (svcCfg.network_mode != null) {
|
||||
network_mode = svcCfg.network_mode;
|
||||
}
|
||||
// svcCfg.extraConfig;
|
||||
|
||||
# Build the full compose document attrset for a group.
|
||||
|
||||
@@ -129,6 +129,31 @@
|
||||
'';
|
||||
};
|
||||
|
||||
extra_hosts = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Additional host entries to add to the container's /etc/hosts file.
|
||||
'';
|
||||
};
|
||||
|
||||
shm_size = lib.mkOption {
|
||||
type = lib.types.optional lib.types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Size of the shared memory segment to allocate.
|
||||
'';
|
||||
};
|
||||
|
||||
network_mode = lib.mkOption {
|
||||
type = lib.types.optional lib.types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Network mode to use for the container.
|
||||
Set to "host" to use the host's network stack.
|
||||
'';
|
||||
};
|
||||
|
||||
files = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = { };
|
||||
@@ -146,8 +171,7 @@
|
||||
default = { };
|
||||
description = ''
|
||||
Free-form attrset merged directly into the compose service
|
||||
block. Use this for keys not modelled above:
|
||||
shm_size, cap_add, ulimits, etc.
|
||||
block. Use this for keys not modelled above.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 CIR0mA RyS/sxPxXWdb6q5asrgqNlF6Bsc4vUsXlgvuowHcDUk
|
||||
egUa2BN2Beqj0wo/tTWV61BmWqesX4W8IGiIUWvRcwY
|
||||
-> ssh-ed25519 LuJNQA MPx6UOrVyrJjbuxYARFGp0OFXD5iMFypCsDtjXTJYUc
|
||||
UCXdNZU2YqjkROdmHdiAhja0eo3DEorhgWjsumxgbww
|
||||
--- FHjBtaqTnM8QZmyOuxMLzFc2P0WpePbyhmrXTxXcdgo
|
||||
gÇ`Ú¶E«ôm´Î#cô5¤+BÞüÝwi›îcšŽd5Œ´®- {®:•¤sÈ`æN–xý‚É•×Ìšvteöa¨
|
||||
ÇX!ºn2kA™ÿϨ6·Ükxü©¿"FýØHxÛœÉpâÒâãªÐ�¤Û£&ô¨Ò±8ƒ{Ðú‹Ç�
|
||||
Reference in new issue
Block a user