Feat/audit improvements #24
+24
-2
@@ -1,11 +1,14 @@
|
|||||||
# Version control: git + delta pager + commitizen. The work host layers
|
# Version control: git + delta pager + commitizen + lazygit. The work host
|
||||||
# commit signing and an email override on top (see work/default.nix).
|
# layers commit signing and an email override on top (see work.nix).
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
fullName,
|
fullName,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
ctp = import ../catppuccin-mocha.nix;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.commitizen
|
pkgs.commitizen
|
||||||
@@ -31,6 +34,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
fetch.prune = true; # drop deleted remote-tracking branches
|
fetch.prune = true; # drop deleted remote-tracking branches
|
||||||
|
# Keep the commit-graph current (fast `git log --graph`, used by `lg`).
|
||||||
|
fetch.writeCommitGraph = true;
|
||||||
|
gc.writeCommitGraph = true;
|
||||||
merge.conflictStyle = "zdiff3"; # show the common ancestor in conflicts
|
merge.conflictStyle = "zdiff3"; # show the common ancestor in conflicts
|
||||||
diff = {
|
diff = {
|
||||||
algorithm = "histogram";
|
algorithm = "histogram";
|
||||||
@@ -61,6 +67,9 @@
|
|||||||
ci = "commit";
|
ci = "commit";
|
||||||
last = "log -1 HEAD";
|
last = "log -1 HEAD";
|
||||||
unstage = "reset HEAD --";
|
unstage = "reset HEAD --";
|
||||||
|
amend = "commit --amend --no-edit"; # tack staged changes onto HEAD
|
||||||
|
fixup = "commit --fixup"; # `git fixup <sha>` -> autosquash on next rebase
|
||||||
|
undo = "reset --soft HEAD~1"; # undo last commit, keep the changes staged
|
||||||
lg = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all";
|
lg = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all";
|
||||||
# commitizen (Conventional Commits, its default ruleset): `git cz c` ->
|
# commitizen (Conventional Commits, its default ruleset): `git cz c` ->
|
||||||
# `cz commit`, `git cz bump`, etc. `git cc` is a shortcut for the prompt.
|
# `cz commit`, `git cz bump`, etc. `git cc` is a shortcut for the prompt.
|
||||||
@@ -92,4 +101,17 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableGitIntegration = true;
|
enableGitIntegration = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# lazygit: TUI for staging/rebasing, themed to Catppuccin Mocha to match.
|
||||||
|
programs.lazygit = {
|
||||||
|
enable = true;
|
||||||
|
settings.gui.theme = {
|
||||||
|
activeBorderColor = [
|
||||||
|
"#${ctp.blue}"
|
||||||
|
"bold"
|
||||||
|
];
|
||||||
|
inactiveBorderColor = [ "#${ctp.surface1}" ];
|
||||||
|
selectedLineBgColor = [ "#${ctp.surface0}" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,22 @@ in
|
|||||||
pkgs.ripgrep
|
pkgs.ripgrep
|
||||||
pkgs.fd
|
pkgs.fd
|
||||||
pkgs.jq
|
pkgs.jq
|
||||||
pkgs.btop
|
|
||||||
pkgs.tea
|
pkgs.tea
|
||||||
|
pkgs.hyperfine # command-line benchmarking
|
||||||
|
pkgs.sd # saner find-and-replace than sed
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Resource monitor, themed Catppuccin Mocha to match the rest of the desktop.
|
||||||
|
# btop does not bundle the theme, so vendor it from catppuccin/btop (pinned).
|
||||||
|
programs.btop = {
|
||||||
|
enable = true;
|
||||||
|
settings.color_theme = "catppuccin_mocha";
|
||||||
|
};
|
||||||
|
xdg.configFile."btop/themes/catppuccin_mocha.theme".source = pkgs.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/catppuccin/btop/f437574b600f1c6d932627050b15ff5153b58fa3/themes/catppuccin_mocha.theme";
|
||||||
|
hash = "sha256-THRpq5vaKCwf9gaso3ycC4TNDLZtBB5Ofh/tOXkfRkQ=";
|
||||||
|
};
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# Keep zsh dotfiles under XDG (~/.config/zsh) rather than the legacy $HOME
|
# Keep zsh dotfiles under XDG (~/.config/zsh) rather than the legacy $HOME
|
||||||
@@ -218,6 +230,7 @@ in
|
|||||||
sensible
|
sensible
|
||||||
vim-tmux-navigator # Ctrl-h/j/k/l across vim splits and tmux panes
|
vim-tmux-navigator # Ctrl-h/j/k/l across vim splits and tmux panes
|
||||||
yank
|
yank
|
||||||
|
extrakto # prefix+Tab: fzf-grab paths/URLs/text from the pane into the prompt
|
||||||
{
|
{
|
||||||
# Catppuccin Mocha statusline (v2 API: flavour + window options must be
|
# Catppuccin Mocha statusline (v2 API: flavour + window options must be
|
||||||
# set before the plugin loads, which home-manager does for plugin
|
# set before the plugin loads, which home-manager does for plugin
|
||||||
@@ -283,7 +296,7 @@ in
|
|||||||
|
|
||||||
# Add the key to the agent on first use, so the passphrase is typed once per
|
# Add the key to the agent on first use, so the passphrase is typed once per
|
||||||
# login session rather than per commit/push (commit signing uses this agent).
|
# login session rather than per commit/push (commit signing uses this agent).
|
||||||
# The work box keeps its own ssh config (see work/default.nix), so this only
|
# The work box keeps its own ssh config (see work.nix), so this only
|
||||||
# manages ~/.ssh/config on the personal hosts.
|
# manages ~/.ssh/config on the personal hosts.
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -39,6 +39,14 @@
|
|||||||
pkgs.wget
|
pkgs.wget
|
||||||
pkgs.claude-code
|
pkgs.claude-code
|
||||||
pkgs.google-cloud-sdk
|
pkgs.google-cloud-sdk
|
||||||
|
# Day-to-day Kubernetes / Helm / Terraform accelerators for this box.
|
||||||
|
pkgs.k9s # cluster TUI
|
||||||
|
pkgs.kubectx # kubectx + kubens (context/namespace switch)
|
||||||
|
pkgs.stern # multi-pod log tail
|
||||||
|
pkgs.dyff # semantic YAML/manifest diffs (Helm release drift)
|
||||||
|
pkgs.tflint # Terraform linter (catches what terraformls won't)
|
||||||
|
pkgs.terraform-docs # generate Terraform module docs
|
||||||
|
pkgs.yq-go # jq for YAML
|
||||||
];
|
];
|
||||||
services.ssh-agent.enable = true;
|
services.ssh-agent.enable = true;
|
||||||
home.shellAliases = {
|
home.shellAliases = {
|
||||||
|
|||||||
Reference in New Issue
Block a user