From 3604b58df289eca8773c9de76fdd6fc6eaacb7d5 Mon Sep 17 00:00:00 2001 From: Petri Hienonen Date: Tue, 2 Dec 2025 14:37:14 +0200 Subject: Correct scripts --- home/default.nix | 188 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 97 insertions(+), 91 deletions(-) (limited to 'home/default.nix') diff --git a/home/default.nix b/home/default.nix index ac20932..0c2f108 100644 --- a/home/default.nix +++ b/home/default.nix @@ -431,7 +431,7 @@ in mpd = { enable = true; musicDirectory = "/media/skydrive/Music/"; - extraArgs = [ "--verbose" ]; + # extraArgs = [ "--verbose" ]; network = { listenAddress = "any"; startWhenNeeded = true; @@ -720,26 +720,23 @@ in }; }; - xdg.configFile."xdg-desktop-portal-termfilechooser/config" = { - force = true; - text = '' - [filechooser] - cmd=yazi-wrapper.sh - open_mode=suggested - save_mode=last - default_dir=$HOME/Downloads - ''; - }; + xdg.configFile."xdg-desktop-portal-termfilechooser/config".source = + (pkgs.formats.toml { }).generate "termfilechooser-config" + { + filechooser = { + cmd = "yazi-wrapper.sh"; + open_mode = "suggested"; + save_mode = "last"; + default_dir = "/home/petri/Downloads"; + }; + }; xdg.configFile."xdg-desktop-portal-termfilechooser/yazi-wrapper.sh" = { force = true; executable = true; - text = '' - #!/usr/bin/env sh + source = pkgs.writeShellScript "yazi-wrapper" '' # This wrapper script is invoked by xdg-desktop-portal-termfilechooser. - # # For more information about input/output arguments read `xdg-desktop-portal-termfilechooser(5)` - set -e if [ "$6" -ge 4 ]; then @@ -802,8 +799,7 @@ in home.file."/.local/bin/bt-notify.sh" = { executable = true; - text = '' - #!/usr/bin/env bash + source = pkgs.writeShellScript "bt-notify" '' set -euo pipefail # Temporary file to remember which devices were connected last loop @@ -863,79 +859,89 @@ in ''; }; - xdg.configFile."goose/config.yaml".text = '' - OPENAI_BASE_PATH: v1/chat/completions - extensions: - developer: - available_tools: [] - bundled: true - description: null - display_name: Developer - enabled: true - name: developer - timeout: 300 - type: builtin - computercontroller: - bundled: true - display_name: Computer Controller - enabled: true - name: computercontroller - timeout: 300 - type: builtin - memory: - available_tools: [] - bundled: true - description: Tools to save and retrieve durable memories - display_name: Memory - enabled: true - name: memory - timeout: 80 - type: builtin - todo: - available_tools: [] - bundled: true - description: Enable a todo list for Goose so it can keep track of what it is doing - enabled: true - name: todo - type: platform - chatrecall: - available_tools: [] - bundled: true - description: Search past conversations and load session summaries for contextual memory - enabled: true - name: chatrecall - type: platform - extensionmanager: - available_tools: [] - bundled: true - description: Enable extension management tools for discovering, enabling, and disabling extensions - enabled: true - name: Extension Manager - type: platform - autovisualiser: - available_tools: [] - bundled: true - description: Data visualisation and UI generation tools - display_name: Auto Visualiser - enabled: true - name: autovisualiser - timeout: 300 - type: builtin - GOOSE_MODE: auto - GOOSE_PROVIDER: openai - GOOSE_MODEL: gpt-4.1-mini - OPENAI_HOST: https://api.openai.com - ''; - - xdg.configFile."ntfy/client.yml".text = '' - default-host: https://ntfy.tammi.cc + xdg.configFile."goose/config.yaml".source = (pkgs.formats.yaml { }).generate "goose-config" { + OPENAI_BASE_PATH = "v1/chat/completions"; + extensions = { + developer = { + available_tools = [ ]; + bundled = true; + description = null; + display_name = "Developer"; + enabled = true; + name = "developer"; + timeout = 300; + type = "builtin"; + }; + computercontroller = { + bundled = true; + display_name = "Computer Controller"; + enabled = true; + name = "computercontroller"; + timeout = 300; + type = "builtin"; + }; + memory = { + available_tools = [ ]; + bundled = true; + description = "Tools to save and retrieve durable memories"; + display_name = "Memory"; + enabled = true; + name = "memory"; + timeout = 80; + type = "builtin"; + }; + todo = { + available_tools = [ ]; + bundled = true; + description = "Enable a todo list for Goose so it can keep track of what it is doing"; + enabled = true; + name = "todo"; + type = "platform"; + }; + chatrecall = { + available_tools = [ ]; + bundled = true; + description = "Search past conversations and load session summaries for contextual memory"; + enabled = true; + name = "chatrecall"; + type = "platform"; + }; + extensionmanager = { + available_tools = [ ]; + bundled = true; + description = "Enable extension management tools for discovering, enabling, and disabling extensions"; + enabled = true; + name = "Extension Manager"; + type = "platform"; + }; + autovisualiser = { + available_tools = [ ]; + bundled = true; + description = "Data visualisation and UI generation tools"; + display_name = "Auto Visualiser"; + enabled = true; + name = "autovisualiser"; + timeout = 300; + type = "builtin"; + }; + }; + GOOSE_MODE = "auto"; + GOOSE_PROVIDER = "openai"; + GOOSE_MODEL = "gpt-4.1-mini"; + OPENAI_HOST = "https://api.openai.com"; + }; - subscribe: - - topic: 77WxlkfsTzGrbYFw - host: https://ntfy.tammi.cc - since: 1h # (optional) only get messages from the last hour - persist: true - keepalive: 45s # (optional) keepalive interval - format: markdown # (optional) output formatting: text, json, markdown, etc. - ''; + xdg.configFile."ntfy/client.yml".source = (pkgs.formats.yaml { }).generate "ntfy-client-config" { + "default-host" = "https://ntfy.tammi.cc"; + subscribe = [ + { + topic = "77WxlkfsTzGrbYFw"; + host = "https://ntfy.tammi.cc"; + since = "1h"; + persist = true; + keepalive = "45s"; + format = "markdown"; + } + ]; + }; } -- cgit v1.2.3-70-g09d2