From e14c8c16988d53a8363e2a71293fb9e9e45f5904 Mon Sep 17 00:00:00 2001 From: rogueking Date: Sun, 22 Feb 2026 01:49:02 -0800 Subject: [PATCH] updates for eva-01 and fastfetch --- flake.lock | 30 +++++++++---------- home-manager/commands/commands.nix | 4 +++ home-manager/commands/fastfetch/fastfetch.nix | 28 +++++++++++++++-- 3 files changed, 44 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 7ce4b2f..0dbd6ab 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1770501766, - "narHash": "sha256-GWAsk06uDuLoKpvEcEP7h3PdWLhdJCxHM7C96s9X7UA=", + "lastModified": 1771563628, + "narHash": "sha256-zfSyNmV4bB7lbKbOmrBy5+239DnE6rp8xr1tmIpmRbk=", "owner": "utensils", "repo": "comfyui-nix", - "rev": "dc0e4a2efc036092a98bb20503f827247f36f49a", + "rev": "82914911ea9346cb64c132b1be73c77a74f570b0", "type": "github" }, "original": { @@ -97,11 +97,11 @@ ] }, "locked": { - "lastModified": 1770260404, - "narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=", + "lastModified": 1771744638, + "narHash": "sha256-EDLi+YAsEEAmMeZe1v6GccuGRbCkpSZp/+A6g+pivR8=", "owner": "nix-community", "repo": "home-manager", - "rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b", + "rev": "cb6c151f5c9db4df0b69d06894dc8484de1f16a0", "type": "github" }, "original": { @@ -118,11 +118,11 @@ ] }, "locked": { - "lastModified": 1771471179, - "narHash": "sha256-XuP8HPzvt4+m9aKVeL9GdGNlTeyeDn3zEeUuorvrw88=", + "lastModified": 1771683283, + "narHash": "sha256-WxAEkAbo8dP7qiyPM6VN4ZGAxfuBVlNBNPkrqkrXVEc=", "owner": "nix-community", "repo": "home-manager", - "rev": "2dedeb55b2c140d9a123ae931588e8903fe202ef", + "rev": "c6ed3eab64d23520bcbb858aa53fe2b533725d4a", "type": "github" }, "original": { @@ -138,11 +138,11 @@ ] }, "locked": { - "lastModified": 1771371916, - "narHash": "sha256-G14VTfmzzRYxAhtEBNanQgCNA++Cv0/9iV4h/lkqX9U=", + "lastModified": 1771520882, + "narHash": "sha256-9SeTZ4Pwr730YfT7V8Azb8GFbwk1ZwiQDAwft3qAD+o=", "owner": "nix-darwin", "repo": "nix-darwin", - "rev": "aff4c008cec17d6a6760949df641ca0ea9179cac", + "rev": "6a7fdcd5839ec8b135821179eea3b58092171bcf", "type": "github" }, "original": { @@ -267,11 +267,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1771208521, - "narHash": "sha256-X01Q3DgSpjeBpapoGA4rzKOn25qdKxbPnxHeMLNoHTU=", + "lastModified": 1771574726, + "narHash": "sha256-D1PA3xQv/s4W3lnR9yJFSld8UOLr0a/cBWMQMXS+1Qg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fa56d7d6de78f5a7f997b0ea2bc6efd5868ad9e8", + "rev": "c217913993d6c6f6805c3b1a3bda5e639adfde6d", "type": "github" }, "original": { diff --git a/home-manager/commands/commands.nix b/home-manager/commands/commands.nix index d3b8814..3dd866a 100644 --- a/home-manager/commands/commands.nix +++ b/home-manager/commands/commands.nix @@ -79,7 +79,11 @@ ] # Host-specific packages ++ lib.optionals (hostname == "eva-01") [ + #apps + rpi-imager + # cli + libusb1 parted traceroute diff --git a/home-manager/commands/fastfetch/fastfetch.nix b/home-manager/commands/fastfetch/fastfetch.nix index 6de712e..36e2e4b 100644 --- a/home-manager/commands/fastfetch/fastfetch.nix +++ b/home-manager/commands/fastfetch/fastfetch.nix @@ -19,8 +19,30 @@ let # Get the image path for the current host, or null if not found hostImage = hostImages.${hostname} or null; - # Detect if terminal is Kitty - isKitty = builtins.getEnv "TERM" == "xterm-kitty" || builtins.getEnv "TERMINAL" == "kitty"; + # Detect terminal type + # Check if we're in an SSH session first + isSSH = builtins.getEnv "SSH_TTY" != "" || builtins.getEnv "SSH_CONNECTION" != ""; + + # Terminal detection logic + # For SSH sessions, default to chafa since we can't guarantee terminal capabilities + # For local sessions, check TERM and TERM_PROGRAM environment variables + terminalType = + if isSSH then + "chafa" # Safe default for remote connections + else + let + term = builtins.getEnv "TERM"; + termProgram = builtins.getEnv "TERM_PROGRAM"; + in + if termProgram == "kitty" || lib.hasInfix "kitty" term then + "kitty" + else if termProgram == "WezTerm" || lib.hasInfix "wezterm" term then + "wezterm" + else if termProgram == "Ghostty" then + "chafa" # Ghostty doesn't have kitty protocol support + else + "chafa"; # Default fallback + in { @@ -30,7 +52,7 @@ in settings = { logo = lib.mkIf (hostImage != null) { source = hostImage; - type = if isKitty then "kitty" else "chafa"; + type = terminalType; height = 20; width = 60; padding = {