This commit is contained in:
mjallen18
2026-03-30 16:09:25 -05:00
parent 8d8d49bd38
commit a88736cf6e
23 changed files with 273 additions and 58 deletions

View File

@@ -7,6 +7,7 @@
}:
let
cfg = config.${namespace}.programs.opencode;
net = lib.${namespace}.network;
in
{
options.${namespace}.programs.opencode = {
@@ -19,7 +20,7 @@ in
sops.templates."hass-mcp.env" = {
mode = "0600";
content = ''
HA_URL=http://10.0.1.4:8123
HA_URL=http://${net.hosts.nuc.lan}:${toString net.ports.nuc.homeAssistant}
HA_TOKEN=${config.sops.placeholder."hass-mcp/token"}
'';
};
@@ -33,7 +34,7 @@ in
npm = "@ai-sdk/openai-compatible";
name = "llama-server (local)";
options = {
baseURL = "http://10.0.1.3:8127/v1";
baseURL = "http://${net.hosts.nas.lan}:${toString net.ports.nas.llamaCpp}/v1";
};
models = {
Qwen3-Coder-Next-Q4_0 = {

View File

@@ -6,6 +6,7 @@
}:
let
cfg = config.${namespace}.shell-aliases;
net = lib.${namespace}.network;
in
{
options.${namespace}.shell-aliases = {
@@ -13,7 +14,7 @@ in
buildHost = lib.mkOption {
type = lib.types.str;
default = "admin@10.0.1.3";
default = "admin@${net.hosts.nas.lan}";
description = "Build host for nixos-rebuild commands";
};
@@ -50,8 +51,8 @@ in
) "nix flake update ${lib.concatStringsSep " " cfg.flakeInputs} --flake /etc/nixos";
# NAS management
update-nas = "nixos-rebuild switch --use-remote-sudo --target-host admin@10.0.1.3 --build-host admin@10.0.1.3 --flake ~/nix-config#jallen-nas";
nas-ssh = "kitten ssh admin@10.0.1.3";
update-nas = "nixos-rebuild switch --use-remote-sudo --target-host admin@${net.hosts.nas.lan} --build-host admin@${net.hosts.nas.lan} --flake ~/nix-config#jallen-nas";
nas-ssh = "kitten ssh admin@${net.hosts.nas.lan}";
}
// cfg.extraAliases;
};