aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--home/default.nix188
-rw-r--r--home/wallpapers/default.nix7
-rw-r--r--home/waybar/default.nix2
-rw-r--r--roles/shared.nix6
4 files changed, 105 insertions, 98 deletions
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";
+ }
+ ];
+ };
}
diff --git a/home/wallpapers/default.nix b/home/wallpapers/default.nix
index c981d8e..5b1f3c2 100644
--- a/home/wallpapers/default.nix
+++ b/home/wallpapers/default.nix
@@ -3,8 +3,10 @@ let
wallpaperScript = pkgs.writeShellScript "update-wallpaper.sh" ''
set -euo pipefail
- if [ -z "''${UNSPLASH_ACCESS_KEY:-}" ]; then
- echo "Error: UNSPLASH_ACCESS_KEY is not set"
+ CREDENTIAL_FILE="$CREDENTIALS_DIRECTORY/login_token"
+ UNSPLASH_ACCESS_KEY=$("${pkgs.coreutils}/bin/cat" "$CREDENTIAL_FILE")
+ if [ -z "$UNSPLASH_ACCESS_KEY" ]; then
+ echo "Error: UNSPLASH_ACCESS_KEY is empty"
exit 1
fi
@@ -61,6 +63,7 @@ in
After = [ "graphical-session.target" ];
};
Service = {
+ loadCredential = [ "login_token:${config.age.secrets.unsplash_access_key.path}" ];
Type = "oneshot";
ExecStart = "${wallpaperScript}";
};
diff --git a/home/waybar/default.nix b/home/waybar/default.nix
index fd9a735..1985f80 100644
--- a/home/waybar/default.nix
+++ b/home/waybar/default.nix
@@ -1,4 +1,4 @@
-{ pkgs, lib, ... }:
+{ pkgs, ... }:
let
waybarTimer = pkgs.writeShellScript "waybar_timer.sh" ''
diff --git a/roles/shared.nix b/roles/shared.nix
index 84988d1..a542623 100644
--- a/roles/shared.nix
+++ b/roles/shared.nix
@@ -563,7 +563,6 @@
alsa.enable = true;
pulse = {
enable = true;
-
};
audio.enable = true;
wireplumber = {
@@ -754,7 +753,7 @@
environment.etc = {
"greetd/hyprland-wrapper.sh" = {
- text = ''
+ source = pkgs.writeShellScript "hyperland-wrapper" ''
#!/bin/sh
# Session
export XDG_SESSION_TYPE=wayland
@@ -772,8 +771,7 @@
};
"bluetooth-tether.sh" = {
mode = "0755";
- text = ''
- #!/bin/sh
+ source = pkgs.writeShellScript "bluetooth-tether" ''
DEVICE_MAC="3C:01:EF:D9:0D:96" # Phone shares the internet
ADAPTER="hci0" # Replace if your adapter is different (check with `bluetoothctl list`)