nix-config/home/zsh.nix
mikl 79260cec6f heather: switch to make-disk-image (qcow2 for YC), drop disko
- Rename muscari -> heather (YC VM). rosemary reserved for future EU server.
- Add hosts/heather/image.nix: YC guest profile + qcow2 build target based on
  nixos/lib/make-disk-image.nix (the nixpkgs-standard cloud image builder).
  partitionTableType=legacy (MBR + single ext4 root, label nixos), GRUB in MBR
  on /dev/vda, virtio drivers, console=ttyS0, cloud-init (Ec2 datasource) so
  poppy ssh key auto-lands from YC metadata, growPartition.
- Drop disko flake input + disk-config.nix (was only for nixos-anywhere runtime
  install; replaced by make-disk-image build-time approach, no kexec).
- Add home/server.nix: minimal headless home for NixOS hosts (no ollama/
  texliveFull/kitty/syncthing/pass). flake mkNixos uses it instead of full ./home.
- k3s.nix: drop dead firewall block (firewall off in image.nix -> trustedInterfaces
  was a no-op). Cilium manages pod networking via BPF.
- image.baseName=heather, configurationLimit=1, remove virtio dups (qemu-guest
  profile already provides most).
- Fix sha256 pin on forgejo mikl.keys (was stale, would break fetchurl).
- home/zsh.nix: source yandex-cloud yc completion.
2026-07-11 21:13:38 +03:00

103 lines
2.8 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ pkgs, lib, ... }:
{
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
# History - disabled, using atuin instead
history = {
size = 1000; # держим в памяти для текущей сессии
save = 0; # не сохраняем в файл
ignoreDups = true;
share = false; # atuin сам разберётся с sync
extended = false;
};
# Pure prompt
plugins = [
{
name = "pure";
src = pkgs.fetchFromGitHub {
owner = "sindresorhus";
repo = "pure";
rev = "v1.23.0";
sha256 = "sha256-BmQO4xqd/3QnpLUitD2obVxL0UulpboT8jGNEh4ri8k=";
};
}
{
name = "zsh-syntax-highlighting";
file = "share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh";
src = pkgs.zsh-syntax-highlighting;
}
{
name = "zsh-autosuggestions";
file = "share/zsh-autosuggestions/zsh-autosuggestions.zsh";
src = pkgs.zsh-autosuggestions;
}
];
# Base aliases (universal)
shellAliases = {
ll = "eza -l --icons --git";
la = "eza -la --icons --git";
ff = "fastfetch";
# gita (manage multiple git repos)
gll = "gita ll";
gllg = "gita ll -g";
gadd = "gita add";
gstatus = "gita status";
gfetch = "gita fetch";
gremote = "gita remote";
ginfo = "gita info";
gll-all = "gita ll -g";
# pass sync (password store)
pass-sync = "pass git push";
pass-pull = "pass git pull";
pass-status = "pass git status";
pass-sync-forgejo = "pass git push origin";
pass-sync-github = "pass git push github";
pass-sync-solmoe = "pass git push git.sol.moe";
pass-pull-all = "pass git pull --all";
};
# Environment setup (zshenv)
envExtra = ''
if [ -x "/opt/homebrew/bin/brew" ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
'';
# Init content
initContent = lib.mkMerge [
''
# Show fastfetch on shell start
echo
fastfetch
echo
# Load pure prompt
autoload -U promptinit; promptinit
prompt pure
# Right prompt - time in gray
RPROMPT='%F{240}%D{%H:%M:%S}%f'
# Yandex Cloud CLI completion
if [ -f "$HOME/yandex-cloud/bin/completion.zsh.inc" ]; then
source "$HOME/yandex-cloud/bin/completion.zsh.inc"
fi
# Pure prompt customization
zstyle ':prompt:pure:prompt:success' color green
zstyle ':prompt:pure:prompt:success' symbol ">"
zstyle ':prompt:pure:prompt:error' color red
zstyle ':prompt:pure:prompt:error' symbol ">"
''
];
};
}