From 559edbe89a08ef3d81b357738fadced50c565ffb Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Sat, 27 Jun 2026 11:21:45 +0100 Subject: [PATCH] various fixes --- home/common/features/xdg.nix | 2 ++ home/common/programs/claude/statusline.sh | 4 +-- home/common/programs/desktop/darkman.nix | 14 --------- home/common/programs/desktop/default.nix | 2 ++ home/common/programs/gpg.nix | 3 ++ home/common/programs/hyprland/default.nix | 6 ++++ .../programs/hyprland/noctalia/default.nix | 1 - home/common/programs/kitty/default.nix | 3 +- home/common/programs/ssh.nix | 30 +++++++++++++++++-- home/desktop/default.nix | 4 --- hosts/common/features/gpu/nvidia.nix | 4 --- 11 files changed, 44 insertions(+), 29 deletions(-) diff --git a/home/common/features/xdg.nix b/home/common/features/xdg.nix index e918813..6cffca8 100644 --- a/home/common/features/xdg.nix +++ b/home/common/features/xdg.nix @@ -4,6 +4,8 @@ userDirs = { enable = true; createDirectories = false; + # Keep exporting XDG_*_DIR as session variables (new default is false). + setSessionVariables = true; desktop = null; documents = null; download = "downloads"; diff --git a/home/common/programs/claude/statusline.sh b/home/common/programs/claude/statusline.sh index eba2545..09ce035 100644 --- a/home/common/programs/claude/statusline.sh +++ b/home/common/programs/claude/statusline.sh @@ -31,7 +31,7 @@ if git -C "$DIR" rev-parse --git-dir > /dev/null 2>&1; then fi fi -# Format cost -COST_FMT=$(printf "%.2f" "$COST") +# Format cost (force C locale so the decimal separator is always ".") +COST_FMT=$(LC_NUMERIC=C printf "%.2f" "$COST") echo "YOLO$REPO_PATH$GIT_INFO | [$MODEL] | \$$COST_FMT | ${CONTEXT_USED}%" diff --git a/home/common/programs/desktop/darkman.nix b/home/common/programs/desktop/darkman.nix index e27e8a4..bdad3ed 100644 --- a/home/common/programs/desktop/darkman.nix +++ b/home/common/programs/desktop/darkman.nix @@ -24,13 +24,6 @@ # Update Hyprland cursor theme ${pkgs.hyprland}/bin/hyprctl setcursor Nordzy-cursors 24 ''; - claude-theme = '' - # Switch Claude Code to dark theme - CLAUDE_CONFIG=~/.claude.json - if [ -f "$CLAUDE_CONFIG" ]; then - ${pkgs.jq}/bin/jq '.theme = "dark"' "$CLAUDE_CONFIG" > "$CLAUDE_CONFIG.tmp" && mv "$CLAUDE_CONFIG.tmp" "$CLAUDE_CONFIG" - fi - ''; noctalia-theme = '' noctalia msg theme-mode-set dark ''; @@ -53,13 +46,6 @@ # Update Hyprland cursor theme ${pkgs.hyprland}/bin/hyprctl setcursor Nordzy-white 24 ''; - claude-theme = '' - # Switch Claude Code to light theme - CLAUDE_CONFIG=~/.claude.json - if [ -f "$CLAUDE_CONFIG" ]; then - ${pkgs.jq}/bin/jq '.theme = "light"' "$CLAUDE_CONFIG" > "$CLAUDE_CONFIG.tmp" && mv "$CLAUDE_CONFIG.tmp" "$CLAUDE_CONFIG" - fi - ''; noctalia-theme = '' noctalia msg theme-mode-set light ''; diff --git a/home/common/programs/desktop/default.nix b/home/common/programs/desktop/default.nix index 6297598..7936152 100644 --- a/home/common/programs/desktop/default.nix +++ b/home/common/programs/desktop/default.nix @@ -59,6 +59,8 @@ name = "Orchis-Dark-Compact"; package = pkgs.orchis-theme; }; + # Keep applying the gtk3 theme to gtk4 too (new default is null). + gtk4.theme = config.gtk.theme; iconTheme = { name = "Tela black"; package = pkgs.tela-icon-theme; diff --git a/home/common/programs/gpg.nix b/home/common/programs/gpg.nix index 4bc0b62..daa59cc 100644 --- a/home/common/programs/gpg.nix +++ b/home/common/programs/gpg.nix @@ -15,6 +15,9 @@ services.gpg-agent = { enable = true; pinentry.package = pkgs.pinentry-gnome3; + # Use gpg-agent as the ssh-agent so AddKeysToAgent ("yes") in ssh.nix + # has an agent to load keys into. + enableSshSupport = true; }; programs.password-store = { diff --git a/home/common/programs/hyprland/default.nix b/home/common/programs/hyprland/default.nix index 653c582..6a6814d 100644 --- a/home/common/programs/hyprland/default.nix +++ b/home/common/programs/hyprland/default.nix @@ -44,12 +44,18 @@ in home.sessionVariables = { ELECTRON_OZONE_PLATFORM_HINT = "auto"; + # WebKitGTK (Tauri apps) renders blank/crashes on the DMABUF path across + # many GPU/driver combos; disable it on all hosts. + WEBKIT_DISABLE_DMABUF_RENDERER = "1"; }; wayland.windowManager.hyprland = { enable = true; package = null; portalPackage = null; + # Keep the hyprlang config format (the new default is "lua"); our + # settings are written as hyprlang. + configType = "hyprlang"; plugins = [ ]; settings = { plugin = { diff --git a/home/common/programs/hyprland/noctalia/default.nix b/home/common/programs/hyprland/noctalia/default.nix index fc9b1f3..9edab0c 100644 --- a/home/common/programs/hyprland/noctalia/default.nix +++ b/home/common/programs/hyprland/noctalia/default.nix @@ -53,7 +53,6 @@ in "gtk3" "gtk4" "hyprland" - "kitty" "qt" ]; }; diff --git a/home/common/programs/kitty/default.nix b/home/common/programs/kitty/default.nix index 465a8f1..042d5b5 100644 --- a/home/common/programs/kitty/default.nix +++ b/home/common/programs/kitty/default.nix @@ -36,6 +36,8 @@ in { programs.kitty = { enable = true; + # Fixed theme — noctalia no longer toggles kitty with dark/light mode. + themeFile = "Catppuccin-Mocha"; settings = { confirm_os_window_close = 0; cursor_trail = 1; @@ -101,7 +103,6 @@ in }; extraConfig = '' - include themes/noctalia.conf cursor_shape block ''; }; diff --git a/home/common/programs/ssh.nix b/home/common/programs/ssh.nix index 61e4508..fe63549 100644 --- a/home/common/programs/ssh.nix +++ b/home/common/programs/ssh.nix @@ -2,10 +2,34 @@ { programs.ssh = { enable = true; - matchBlocks = { + + # Opt out of the soon-to-be-removed implicit `settings."*"` defaults. + # They only ever matched OpenSSH's own defaults, so nothing is lost. + enableDefaultConfig = false; + + # `settings` is a freeform block set: attribute names are Host/Match + # patterns, values use OpenSSH directive names directly. + settings = { + "*" = { + # Connection multiplexing — reuse one TCP/auth connection for + # repeated ssh/git/scp to the same host. `%C` is a hash, so no + # parent directory needs pre-creating. + ControlMaster = "auto"; + ControlPath = "~/.ssh/control-%C"; + ControlPersist = "10m"; + + # Keep idle sessions alive; drop genuinely dead ones after ~3 min. + ServerAliveInterval = 60; + ServerAliveCountMax = 3; + + # Load the key into the (gpg-)agent on first use — passphrase once + # per session. Requires services.gpg-agent.enableSshSupport. + AddKeysToAgent = "yes"; + }; + "yolo" = { - hostname = "10.7.10.2"; - remoteForwards = [ + HostName = "10.7.10.2"; + RemoteForward = [ { bind.port = 9222; host.address = "localhost"; diff --git a/home/desktop/default.nix b/home/desktop/default.nix index 71d6ceb..2816b34 100644 --- a/home/desktop/default.nix +++ b/home/desktop/default.nix @@ -36,10 +36,6 @@ }; wayland.windowManager.hyprland.settings = { - env = [ - "WEBKIT_DISABLE_DMABUF_RENDERER, 1" - ]; - exec-once = [ "$HOME/.local/bin/hyprpaper-rotate" ]; diff --git a/hosts/common/features/gpu/nvidia.nix b/hosts/common/features/gpu/nvidia.nix index d323266..bf196e0 100644 --- a/hosts/common/features/gpu/nvidia.nix +++ b/hosts/common/features/gpu/nvidia.nix @@ -11,10 +11,6 @@ programs.xwayland.enable = true; - environment.variables = { - "WEBKIT_DISABLE_DMABUF_RENDERER" = "1"; - }; - hardware.graphics.extraPackages = with pkgs; [ nvidia-vaapi-driver ];