forked from lukas/nixos-config
44 lines
1.3 KiB
Nix
44 lines
1.3 KiB
Nix
{
|
|
programs.zsh = {
|
|
enable = true;
|
|
enableCompletion = true;
|
|
autosuggestion.enable = true;
|
|
syntaxHighlighting.enable = true;
|
|
initContent = ''
|
|
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -td /run/user/$(id -u)/hypr/* 2>/dev/null | head -n1 | xargs -n1 basename)
|
|
yazi() {
|
|
local tmp="$(mktemp)"
|
|
command yazi --cwd-file="$tmp" "$@"
|
|
if [ -f "$tmp" ]; then
|
|
local dir="$(cat "$tmp")"
|
|
rm -f "$tmp"
|
|
[ -d "$dir" ] && cd "$dir"
|
|
fi
|
|
}
|
|
'';
|
|
|
|
|
|
|
|
oh-my-zsh = {
|
|
enable = true;
|
|
theme = "cypher"; #"robbyrussell", "bira", "agnoster" "cypher"
|
|
};
|
|
|
|
shellAliases = {
|
|
la = "ls -la";
|
|
y = "yazi";
|
|
v = "nvim";
|
|
d = "watch -n1 -t date +%H:%M";
|
|
".." = "cd ..";
|
|
"..." = "cd ../..";
|
|
cdn = "cd ~/platform";
|
|
ngp = "git -C ~/nixos-config pull";
|
|
gpn = "git -C ~/nixos-config add . && git -C ~/nixos-config commit -m 'auto' && git -C ~/nixos-config push";
|
|
nrst = "sudo nixos-rebuild switch --flake ~/platform/nixos-config#tnix";
|
|
nrsb = "nixos-rebuild switch --target-host blunix --sudo --flake ~/platform/nixos-config#blunix";
|
|
nrsp = "nixos-rebuild switch --target-host pinix --sudo --flake ~/platform/nixos-config#pinix";
|
|
nb = "gpn && nrs && cd";
|
|
};
|
|
};
|
|
|
|
}
|