WIP: home-manager modules and install tooling (in progress, unreviewed)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J1cugeLkfFLZMpiztQ8TyN
This commit is contained in:
30 files changed
+2619
No files matched your search
@@ -0,0 +1,84 @@
|
||||
# Interactive shell: zsh with starship prompt, fzf, zoxide, eza, bat, direnv.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.home.shell;
|
||||
in
|
||||
{
|
||||
options.my.home.shell.enable = lib.mkEnableOption "zsh shell environment and CLI tools";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autocd = true;
|
||||
|
||||
history = {
|
||||
size = 50000;
|
||||
save = 50000;
|
||||
# Share between open terminals, skip duplicates and space-prefixed lines.
|
||||
share = true;
|
||||
ignoreDups = true;
|
||||
ignoreSpace = true;
|
||||
extended = true;
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
cat = "bat";
|
||||
".." = "cd ..";
|
||||
g = "git";
|
||||
# nh builds, diffs and activates the flake in one step.
|
||||
rebuild = "nh os switch";
|
||||
rebuild-boot = "nh os boot";
|
||||
rebuild-test = "nh os test";
|
||||
};
|
||||
};
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
# Keeps the prompt on one line when the nix shell or direnv is active.
|
||||
nix_shell.format = "[$symbol$state]($style) ";
|
||||
};
|
||||
};
|
||||
|
||||
fzf = {
|
||||
enable = true;
|
||||
defaultCommand = "fd --type f --hidden --exclude .git";
|
||||
fileWidget.command = "fd --type f --hidden --exclude .git";
|
||||
changeDirWidget.command = "fd --type d --hidden --exclude .git";
|
||||
};
|
||||
|
||||
# `z dir` jumps to frecent directories, `zi` picks with fzf.
|
||||
zoxide.enable = true;
|
||||
|
||||
# ls, ll, la, lt and lla aliases come from the zsh integration.
|
||||
eza = {
|
||||
enable = true;
|
||||
icons = "auto";
|
||||
git = true;
|
||||
};
|
||||
|
||||
bat.enable = true;
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
btop.enable = true;
|
||||
fastfetch.enable = true;
|
||||
};
|
||||
|
||||
# fd backs the fzf commands above.
|
||||
home.packages = [ pkgs.fd ];
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user