Switch to fish shell, ghostty terminal, and simplified prompt
- Replace bash with fish as default shell (all hosts)
- Replace kgx with ghostty (desktop hosts), update Super+T keybinding
- Custom two-line fish prompt: NixOS icon, username, path, hostname, ❯
- Nix-shell awareness, red ❯ on error
- Simplify fastfetch: user@host, OS, kernel, shell, terminal, uptime, memory
- Ghostty config: FiraCode Nerd Font, catppuccin-mocha, no titlebar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 13:22:21 +01:00
|
|
|
|
{ config, pkgs, lib, ... }:
|
2025-12-03 19:53:58 +00:00
|
|
|
|
{
|
2025-12-21 20:42:08 +00:00
|
|
|
|
# Install fastfetch
|
2025-12-03 19:53:58 +00:00
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
|
fastfetch
|
|
|
|
|
|
];
|
2025-12-21 20:42:08 +00:00
|
|
|
|
|
2025-12-03 20:29:05 +00:00
|
|
|
|
# Install Nerd Fonts for icon support
|
|
|
|
|
|
fonts.packages = with pkgs; [
|
2025-12-03 20:29:57 +00:00
|
|
|
|
nerd-fonts.fira-code
|
|
|
|
|
|
nerd-fonts.jetbrains-mono
|
|
|
|
|
|
nerd-fonts.meslo-lg
|
2025-12-03 20:29:05 +00:00
|
|
|
|
];
|
2025-12-21 20:42:08 +00:00
|
|
|
|
|
Switch to fish shell, ghostty terminal, and simplified prompt
- Replace bash with fish as default shell (all hosts)
- Replace kgx with ghostty (desktop hosts), update Super+T keybinding
- Custom two-line fish prompt: NixOS icon, username, path, hostname, ❯
- Nix-shell awareness, red ❯ on error
- Simplify fastfetch: user@host, OS, kernel, shell, terminal, uptime, memory
- Ghostty config: FiraCode Nerd Font, catppuccin-mocha, no titlebar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 13:22:21 +01:00
|
|
|
|
# Simple fastfetch config — shown on terminal start
|
|
|
|
|
|
# Run `fastfetch` manually for full system info
|
2025-12-03 19:53:58 +00:00
|
|
|
|
environment.etc."fastfetch/config.jsonc".text = ''
|
|
|
|
|
|
{
|
|
|
|
|
|
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
2025-12-21 12:16:53 +00:00
|
|
|
|
"logo": {
|
|
|
|
|
|
"source": "none"
|
|
|
|
|
|
},
|
2025-12-03 19:53:58 +00:00
|
|
|
|
"display": {
|
2025-12-03 20:22:36 +00:00
|
|
|
|
"separator": " ",
|
2025-12-03 19:53:58 +00:00
|
|
|
|
"color": {
|
|
|
|
|
|
"keys": "blue",
|
|
|
|
|
|
"title": "cyan"
|
2025-12-03 20:58:54 +00:00
|
|
|
|
},
|
|
|
|
|
|
"key": {
|
|
|
|
|
|
"type": "icon"
|
2025-12-03 19:53:58 +00:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"modules": [
|
|
|
|
|
|
{
|
Switch to fish shell, ghostty terminal, and simplified prompt
- Replace bash with fish as default shell (all hosts)
- Replace kgx with ghostty (desktop hosts), update Super+T keybinding
- Custom two-line fish prompt: NixOS icon, username, path, hostname, ❯
- Nix-shell awareness, red ❯ on error
- Simplify fastfetch: user@host, OS, kernel, shell, terminal, uptime, memory
- Ghostty config: FiraCode Nerd Font, catppuccin-mocha, no titlebar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 13:22:21 +01:00
|
|
|
|
"type": "title",
|
|
|
|
|
|
"format": "{user-name}@{host-name}"
|
2025-12-03 19:53:58 +00:00
|
|
|
|
},
|
Switch to fish shell, ghostty terminal, and simplified prompt
- Replace bash with fish as default shell (all hosts)
- Replace kgx with ghostty (desktop hosts), update Super+T keybinding
- Custom two-line fish prompt: NixOS icon, username, path, hostname, ❯
- Nix-shell awareness, red ❯ on error
- Simplify fastfetch: user@host, OS, kernel, shell, terminal, uptime, memory
- Ghostty config: FiraCode Nerd Font, catppuccin-mocha, no titlebar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 13:22:21 +01:00
|
|
|
|
"separator",
|
|
|
|
|
|
"os",
|
|
|
|
|
|
"kernel",
|
|
|
|
|
|
"shell",
|
|
|
|
|
|
"terminal",
|
|
|
|
|
|
"uptime",
|
|
|
|
|
|
"memory"
|
2025-12-03 19:53:58 +00:00
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
'';
|
2025-12-21 20:42:08 +00:00
|
|
|
|
|
Switch to fish shell, ghostty terminal, and simplified prompt
- Replace bash with fish as default shell (all hosts)
- Replace kgx with ghostty (desktop hosts), update Super+T keybinding
- Custom two-line fish prompt: NixOS icon, username, path, hostname, ❯
- Nix-shell awareness, red ❯ on error
- Simplify fastfetch: user@host, OS, kernel, shell, terminal, uptime, memory
- Ghostty config: FiraCode Nerd Font, catppuccin-mocha, no titlebar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 13:22:21 +01:00
|
|
|
|
# Fish prompt and terminal startup
|
|
|
|
|
|
programs.fish.interactiveShellInit = ''
|
2026-04-08 13:29:06 +01:00
|
|
|
|
# Disable default greeting
|
|
|
|
|
|
set -g fish_greeting
|
|
|
|
|
|
|
2025-12-03 21:29:18 +00:00
|
|
|
|
# Run fastfetch on terminal start
|
Switch to fish shell, ghostty terminal, and simplified prompt
- Replace bash with fish as default shell (all hosts)
- Replace kgx with ghostty (desktop hosts), update Super+T keybinding
- Custom two-line fish prompt: NixOS icon, username, path, hostname, ❯
- Nix-shell awareness, red ❯ on error
- Simplify fastfetch: user@host, OS, kernel, shell, terminal, uptime, memory
- Ghostty config: FiraCode Nerd Font, catppuccin-mocha, no titlebar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 13:22:21 +01:00
|
|
|
|
fastfetch --config /etc/fastfetch/config.jsonc
|
|
|
|
|
|
|
|
|
|
|
|
# Custom prompt
|
|
|
|
|
|
function fish_prompt
|
|
|
|
|
|
set -l last_status $status
|
|
|
|
|
|
|
|
|
|
|
|
# Nix-shell indicator
|
|
|
|
|
|
if set -q IN_NIX_SHELL
|
|
|
|
|
|
set_color yellow
|
|
|
|
|
|
printf '[nix-shell] '
|
|
|
|
|
|
set_color normal
|
|
|
|
|
|
end
|
|
|
|
|
|
|
2026-04-08 13:29:06 +01:00
|
|
|
|
# Line 1: hostname ~/path
|
Switch to fish shell, ghostty terminal, and simplified prompt
- Replace bash with fish as default shell (all hosts)
- Replace kgx with ghostty (desktop hosts), update Super+T keybinding
- Custom two-line fish prompt: NixOS icon, username, path, hostname, ❯
- Nix-shell awareness, red ❯ on error
- Simplify fastfetch: user@host, OS, kernel, shell, terminal, uptime, memory
- Ghostty config: FiraCode Nerd Font, catppuccin-mocha, no titlebar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 13:22:21 +01:00
|
|
|
|
set_color green
|
|
|
|
|
|
printf ' '
|
|
|
|
|
|
set_color yellow
|
2026-04-08 13:29:06 +01:00
|
|
|
|
printf '%s' (hostname)
|
Switch to fish shell, ghostty terminal, and simplified prompt
- Replace bash with fish as default shell (all hosts)
- Replace kgx with ghostty (desktop hosts), update Super+T keybinding
- Custom two-line fish prompt: NixOS icon, username, path, hostname, ❯
- Nix-shell awareness, red ❯ on error
- Simplify fastfetch: user@host, OS, kernel, shell, terminal, uptime, memory
- Ghostty config: FiraCode Nerd Font, catppuccin-mocha, no titlebar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 13:22:21 +01:00
|
|
|
|
set_color normal
|
|
|
|
|
|
printf ' '
|
|
|
|
|
|
|
|
|
|
|
|
# Path with colored segments
|
|
|
|
|
|
set -l realhome (string escape --style=regex -- $HOME)
|
|
|
|
|
|
set -l path (string replace -r "^$realhome" '~' $PWD)
|
|
|
|
|
|
set -l parts (string split '/' $path)
|
|
|
|
|
|
set -l colors green cyan blue
|
|
|
|
|
|
|
|
|
|
|
|
for i in (seq (count $parts))
|
|
|
|
|
|
set -l part $parts[$i]
|
|
|
|
|
|
if test -n "$part"
|
|
|
|
|
|
if test $i -gt 1
|
|
|
|
|
|
set_color brblack
|
|
|
|
|
|
printf '/'
|
|
|
|
|
|
end
|
|
|
|
|
|
set -l cidx (math '(' $i - 1 ')' '%' 3 + 1)
|
|
|
|
|
|
set_color $colors[$cidx]
|
|
|
|
|
|
printf '%s' $part
|
|
|
|
|
|
end
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
set_color normal
|
|
|
|
|
|
printf '\n'
|
|
|
|
|
|
|
|
|
|
|
|
# Line 2: ❯
|
|
|
|
|
|
if test $last_status -ne 0
|
|
|
|
|
|
set_color red
|
|
|
|
|
|
else
|
|
|
|
|
|
set_color magenta
|
|
|
|
|
|
end
|
|
|
|
|
|
printf '❯ '
|
|
|
|
|
|
set_color normal
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# Disable the default right prompt
|
|
|
|
|
|
function fish_right_prompt; end
|
2025-12-03 20:29:05 +00:00
|
|
|
|
'';
|
2025-12-03 19:53:58 +00:00
|
|
|
|
}
|