net
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user