bunch of nixos updates

This commit is contained in:
2026-03-09 02:50:31 +00:00
parent 961676025b
commit 396882d364
16 changed files with 715 additions and 36 deletions
+5 -5
View File
@@ -10,7 +10,7 @@ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
// ============ CONFIGURATION ============
const REMOTE_HOST = "linux-pc"; // SSH host for remote notifications
const LOCAL_SOUND_MAC = "/System/Library/Sounds/Glass.aiff";
const LOCAL_SOUND_LINUX = "/usr/share/sounds/freedesktop/stereo/complete.oga";
const LOCAL_SOUND_LINUX = "/run/current-system/sw/share/sounds/freedesktop/stereo/window-attention.oga";
// =======================================
function isSSH(): boolean {
@@ -37,7 +37,7 @@ function isSSH(): boolean {
function notifyRemote(message: string): void {
const { exec } = require("child_process");
exec(
`ssh -o ConnectTimeout=2 -o BatchMode=yes ${REMOTE_HOST} "paplay /usr/share/sounds/freedesktop/stereo/window-attention.oga & notify-send -i ~/.pi/agent/extensions/assets/pi-logo.svg 'Pi' '${message}'"`,
`ssh -o ConnectTimeout=2 -o BatchMode=yes ${REMOTE_HOST} "pw-play /run/current-system/sw/share/sounds/freedesktop/stereo/window-attention.oga & notify-send -i ~/.pi/agent/extensions/assets/pi-logo.svg 'Pi' '${message}'"`,
{ timeout: 5000 },
);
}
@@ -48,10 +48,10 @@ function notifyLocal(message: string): void {
execFile("afplay", [LOCAL_SOUND_MAC]);
} else if (process.platform === "linux") {
execFile(
"paplay",
["/usr/share/sounds/freedesktop/stereo/window-attention.oga"],
"pw-play",
[LOCAL_SOUND_LINUX],
(err: any) => {
if (err) console.error("paplay error:", err);
if (err) console.error("pw-play error:", err);
},
);
exec(