fix: spec review - add missing fish module to base/shell
- Create home/base/shell/fish.nix - Add to base/shell/default.nix imports - Migrate remaining hosts from features.cli.fish to base.shell.fish
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
# Shell aggregator — imports Nushell (primary) and Starship prompt.
|
# Shell aggregator — imports Nushell (primary), Fish, and Starship prompt.
|
||||||
{...}: {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./nushell.nix
|
./nushell.nix
|
||||||
|
./fish.nix
|
||||||
./starship.nix
|
./starship.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
117
home/base/shell/fish.nix
Normal file
117
home/base/shell/fish.nix
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
# Fish shell configuration exposed under the new base namespace.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.base.shell.fish;
|
||||||
|
in {
|
||||||
|
options.base.shell.fish.enable = mkEnableOption "enable fish shell";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
interactiveShellInit = ''
|
||||||
|
# Fish colors using universal nix-colors palette
|
||||||
|
# Text colors
|
||||||
|
set -g fish_color_normal ${config.colorScheme.palette.base05} # text
|
||||||
|
set -g fish_color_param ${config.colorScheme.palette.base05} # text
|
||||||
|
set -g fish_color_comment ${config.colorScheme.palette.base03} # muted
|
||||||
|
set -g fish_color_autosuggestion ${config.colorScheme.palette.base03} # muted
|
||||||
|
|
||||||
|
# Command colors
|
||||||
|
set -g fish_color_command ${config.colorScheme.palette.base0D} # accent6 (blue)
|
||||||
|
set -g fish_color_quote ${config.colorScheme.palette.base0A} # accent3 (yellow)
|
||||||
|
set -g fish_color_redirection ${config.colorScheme.palette.base0E} # accent7 (purple)
|
||||||
|
set -g fish_color_end ${config.colorScheme.palette.base08} # accent1 (red)
|
||||||
|
set -g fish_color_error ${config.colorScheme.palette.base08} # accent1 (red)
|
||||||
|
set -g fish_color_operator ${config.colorScheme.palette.base0C} # accent5 (cyan)
|
||||||
|
set -g fish_color_escape ${config.colorScheme.palette.base09} # accent2 (orange)
|
||||||
|
|
||||||
|
# Path colors
|
||||||
|
set -g fish_color_cwd ${config.colorScheme.palette.base0B} # accent4 (green)
|
||||||
|
set -g fish_color_cwd_root ${config.colorScheme.palette.base08} # accent1 (red)
|
||||||
|
set -g fish_color_valid_path --underline
|
||||||
|
|
||||||
|
# Interactive colors
|
||||||
|
set -g fish_color_match ${config.colorScheme.palette.base0B} # accent4 (green)
|
||||||
|
set -g fish_color_selection --background=${config.colorScheme.palette.base02} # overlay
|
||||||
|
set -g fish_color_search_match --background=${config.colorScheme.palette.base02} # overlay
|
||||||
|
set -g fish_color_history_current --bold
|
||||||
|
set -g fish_color_user ${config.colorScheme.palette.base0B} # accent4 (green)
|
||||||
|
set -g fish_color_host ${config.colorScheme.palette.base0D} # accent6 (blue)
|
||||||
|
set -g fish_color_cancel -r
|
||||||
|
|
||||||
|
# Pager colors
|
||||||
|
set -g fish_pager_color_completion normal
|
||||||
|
set -g fish_pager_color_description ${config.colorScheme.palette.base03} # muted
|
||||||
|
set -g fish_pager_color_prefix ${config.colorScheme.palette.base0E} # accent7 (purple)
|
||||||
|
set -g fish_pager_color_progress ${config.colorScheme.palette.base0B} # accent4 (green)
|
||||||
|
'';
|
||||||
|
loginShellInit = ''
|
||||||
|
set -x NIX_PATH nixpkgs=channel:nixos-unstable
|
||||||
|
set -x NIX_LOG info
|
||||||
|
set -x WEBKIT_DISABLE_COMPOSITING_MODE 1
|
||||||
|
set -x TERMINAL ghostty
|
||||||
|
set -x EDITOR nvim
|
||||||
|
set -x VISUAL zed
|
||||||
|
set -x XDG_DATA_HOME $HOME/.local/share
|
||||||
|
set -x FZF_CTRL_R_OPTS "
|
||||||
|
--preview='bat --color=always -n {}'
|
||||||
|
--preview-window up:3:hidden:wrap
|
||||||
|
--bind 'ctrl-/:toggle-preview'
|
||||||
|
--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'
|
||||||
|
--color header:bold
|
||||||
|
--header 'Press CTRL-Y to copy command into clipboard'"
|
||||||
|
set -x FZF_DEFAULT_COMMAND fd --type f --exclude .git --follow --hidden
|
||||||
|
set -x FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
|
||||||
|
set -x FLAKE $HOME/p/nixos/nixos-config
|
||||||
|
source /run/agenix/${config.home.username}-secrets
|
||||||
|
|
||||||
|
if test (tty) = "/dev/tty1"
|
||||||
|
exec uwsm start -F /run/current-system/sw/bin/Hyprland
|
||||||
|
end
|
||||||
|
if test (tty) = "/dev/tty2"
|
||||||
|
exec gamescope -O HDMI-A-1 -W 1920 -H 1080 --adaptive-sync --hdr-enabled --rt --steam -- steam -pipewire-dmabuf -tenfoot
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
shellAbbrs = {
|
||||||
|
".." = "cd ..";
|
||||||
|
"..." = "cd ../..";
|
||||||
|
b = "yazi";
|
||||||
|
ls = "eza";
|
||||||
|
l = "eza -l --icons --git -a";
|
||||||
|
lt = "eza --tree --level=2 --long --icons --git";
|
||||||
|
grep = "rg";
|
||||||
|
ps = "procs";
|
||||||
|
just = "just --unstable";
|
||||||
|
node = "bun";
|
||||||
|
npx = "bunx";
|
||||||
|
fs = "du -ah . | sort -hr | head -n 10";
|
||||||
|
|
||||||
|
n = "nix";
|
||||||
|
nd = "nix develop -c $SHELL";
|
||||||
|
ns = "nix shell";
|
||||||
|
nsn = "nix shell nixpkgs#";
|
||||||
|
nb = "nix build";
|
||||||
|
nbn = "nix build nixpkgs#";
|
||||||
|
nf = "nix flake";
|
||||||
|
|
||||||
|
nr = "sudo nixos-rebuild --flake .";
|
||||||
|
nrs = "sudo nixos-rebuild switch --flake .#(uname -n)";
|
||||||
|
snr = "sudo nixos-rebuild --flake .";
|
||||||
|
snrs = "sudo nixos-rebuild --flake . switch";
|
||||||
|
hm = "home-manager --flake .";
|
||||||
|
hms = "home-manager --flake . switch";
|
||||||
|
hmr = "cd ~/projects/nix-configurations; nix flake lock --update-input dotfiles; home-manager --flake .#(whoami)@(hostname) switch";
|
||||||
|
|
||||||
|
tsu = "sudo tailscale up";
|
||||||
|
tsd = "sudo tailscale down";
|
||||||
|
|
||||||
|
vi = "nvim";
|
||||||
|
vim = "nvim";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -13,13 +13,12 @@ in {
|
|||||||
context = "server";
|
context = "server";
|
||||||
})
|
})
|
||||||
./home-server.nix
|
./home-server.nix
|
||||||
# Fish shell — no equivalent in new base module yet
|
|
||||||
../features/cli/fish.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Base CLI tools (new namespace)
|
# Base CLI tools (new namespace)
|
||||||
base = {
|
base = {
|
||||||
shell = {
|
shell = {
|
||||||
|
fish.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
};
|
};
|
||||||
cliTools = {
|
cliTools = {
|
||||||
@@ -28,6 +27,4 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Fish shell (legacy — no new equivalent yet)
|
|
||||||
features.cli.fish.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ with lib; {
|
|||||||
context = "desktop";
|
context = "desktop";
|
||||||
})
|
})
|
||||||
./home.nix
|
./home.nix
|
||||||
# Fish shell — no equivalent in new base module yet
|
|
||||||
../features/cli/fish.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
@@ -24,6 +22,7 @@ with lib; {
|
|||||||
# Base CLI tools (new namespace)
|
# Base CLI tools (new namespace)
|
||||||
base = {
|
base = {
|
||||||
shell = {
|
shell = {
|
||||||
|
fish.enable = true;
|
||||||
nushell.enable = true;
|
nushell.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
};
|
};
|
||||||
@@ -35,8 +34,6 @@ with lib; {
|
|||||||
secrets.enable = true;
|
secrets.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Fish shell (legacy — features namespace, no new equivalent yet)
|
|
||||||
features.cli.fish.enable = true;
|
|
||||||
|
|
||||||
# Desktop features (new namespace)
|
# Desktop features (new namespace)
|
||||||
desktop = {
|
desktop = {
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ with lib; {
|
|||||||
context = "desktop";
|
context = "desktop";
|
||||||
})
|
})
|
||||||
./home.nix
|
./home.nix
|
||||||
# Fish shell — no equivalent in new base module yet
|
|
||||||
../features/cli/fish.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
@@ -24,6 +22,7 @@ with lib; {
|
|||||||
# Base CLI tools (new namespace)
|
# Base CLI tools (new namespace)
|
||||||
base = {
|
base = {
|
||||||
shell = {
|
shell = {
|
||||||
|
fish.enable = true;
|
||||||
nushell.enable = true;
|
nushell.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
};
|
};
|
||||||
@@ -35,8 +34,6 @@ with lib; {
|
|||||||
secrets.enable = true;
|
secrets.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Fish shell (legacy — no new equivalent yet)
|
|
||||||
features.cli.fish.enable = true;
|
|
||||||
|
|
||||||
# Desktop features (new namespace)
|
# Desktop features (new namespace)
|
||||||
desktop = {
|
desktop = {
|
||||||
|
|||||||
@@ -13,13 +13,12 @@ in {
|
|||||||
context = "server";
|
context = "server";
|
||||||
})
|
})
|
||||||
./home-server.nix
|
./home-server.nix
|
||||||
# Fish shell — no equivalent in new base module yet
|
|
||||||
../features/cli/fish.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Base CLI tools (new namespace)
|
# Base CLI tools (new namespace)
|
||||||
base = {
|
base = {
|
||||||
shell = {
|
shell = {
|
||||||
|
fish.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
};
|
};
|
||||||
cliTools = {
|
cliTools = {
|
||||||
@@ -28,6 +27,4 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Fish shell (legacy — no new equivalent yet)
|
|
||||||
features.cli.fish.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,13 +13,12 @@ in {
|
|||||||
context = "server";
|
context = "server";
|
||||||
})
|
})
|
||||||
./home-server.nix
|
./home-server.nix
|
||||||
# Fish shell — no equivalent in new base module yet
|
|
||||||
../features/cli/fish.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Base CLI tools (new namespace)
|
# Base CLI tools (new namespace)
|
||||||
base = {
|
base = {
|
||||||
shell = {
|
shell = {
|
||||||
|
fish.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
};
|
};
|
||||||
cliTools = {
|
cliTools = {
|
||||||
@@ -28,6 +27,4 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Fish shell (legacy — no new equivalent yet)
|
|
||||||
features.cli.fish.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user