better cleaner containers

This commit is contained in:
ari committed 2026-06-29 09:57:40 -04:00
1 parent 4bd849e534
commit f8874f6e15
4 files changed
+51 -15

No files matched your search

+25 -9
View File
@@ -1,5 +1,6 @@
{ pkgs
, config
, nixosUtils
, ...
}:
let
@@ -191,20 +192,35 @@ in
PUID = "1000"; # ari's UID
PGID = "100"; # GID of the 'users' group in NixOS
};
extraConfig.shm_size = "1g";
extraConfig = {
shm_size = "1g";
extra_hosts = [ "host.docker.internal:host-gateway" ];
};
files = {
"/opt/data/config.yaml" = ''
"/opt/data/config.yaml" = nixosUtils.validateYaml "hermes-config" ''
model:
provider: custom
model: gpt-oss:20b
base_url: http://host.docker.internal:11434/v1
api_key: "none"
memory:
memory_enabled: true
user_profile_enabled: true
terminal:
backend: docker
gateway:
platforms:
telegram:
extra:
status_indicator: true
status_online: "🟢 Online"
status_offline: "🔴 Offline"
gateway:
platforms:
telegram:
extra:
status_indicator: true
status_online: "🟢 Online"
status_offline: "🔴 Offline"
'';
};
extraConfig.shm_size = "1g";
};
};
# Signal CLI
+11 -5
View File
@@ -16,7 +16,7 @@ let
allPkgs = eachSystem (
system:
import nixpkgs {
system = system;
inherit system;
config = {
allowUnfree = true;
};
@@ -27,6 +27,12 @@ let
];
}
);
# Build nixosUtils with access to pkgs and lib
nixosUtils = import ./nixos-utils.nix {
pkgs = allPkgs.x86_64-linux;
lib = nixpkgs.lib;
};
osModules = [
determinate.nixosModules.default
stylix.nixosModules.stylix
@@ -60,7 +66,7 @@ in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = specialArgs // {
inherit system skygUtils;
inherit system skygUtils nixosUtils;
user = userConfig;
unstablePkgs = nixpkgs-unstable.legacyPackages.${system};
};
@@ -82,7 +88,7 @@ in
, configuration ? [ ]
}: nixpkgs.lib.nixosSystem {
specialArgs = specialArgs // {
inherit system skygUtils user;
inherit system skygUtils nixosUtils user;
unstablePkgs = nixpkgs-unstable.legacyPackages.${system};
};
inherit system;
@@ -104,7 +110,7 @@ in
, configuration ? [ ]
}: nixpkgs.lib.nixosSystem {
specialArgs = specialArgs // {
inherit system skygUtils user;
inherit system skygUtils nixosUtils user;
unstablePkgs = nixpkgs-unstable.legacyPackages.${system};
};
inherit system;
@@ -132,7 +138,7 @@ in
nix-darwin.lib.darwinSystem {
inherit system;
specialArgs = specialArgs // {
inherit system skygUtils user;
inherit system skygUtils nixosUtils user;
unstablePkgs = nixpkgs-unstable.legacyPackages.${system};
};
modules = [
+15
View File
@@ -0,0 +1,15 @@
{ pkgs, lib }:
{
# YAML validation helper — validates YAML syntax at build time
validateYaml = name: content:
let
validated = pkgs.runCommand "${name}-validated" { } ''
${pkgs.yq}/bin/yq eval -e '.' > /dev/null <<'EOF'
${content}
EOF
echo "${content}" > $out
'';
in
validated;
}
@@ -76,7 +76,6 @@ rec {
before = [ "container-services-${groupName}.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = scriptFile;
};
};