Move zsh to home-manager.
This commit is contained in:
parent
2d5a268cfd
commit
2246be4b50
16
flake.lock
16
flake.lock
|
@ -7,32 +7,32 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719827415,
|
||||
"narHash": "sha256-pvh+1hStXXAZf0sZ1xIJbWGx4u+OGBC1rVx6Wsw0fBw=",
|
||||
"lastModified": 1734366194,
|
||||
"narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f2e3c19867262dbe84fdfab42467fc8dd83a2005",
|
||||
"rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.11",
|
||||
"ref": "release-24.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1720535198,
|
||||
"narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=",
|
||||
"lastModified": 1735141468,
|
||||
"narHash": "sha256-VIAjBr1qGcEbmhLwQJD6TABppPMggzOvqFsqkDoMsAY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5",
|
||||
"rev": "4005c3ff7505313cbc21081776ad0ce5dfd7a3ce",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-23.11",
|
||||
"ref": "nixos-24.11",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||
nixpkgs.url = "nixpkgs/nixos-24.11";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
url = "github:nix-community/home-manager/release-24.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
|
91
home.nix
91
home.nix
|
@ -4,6 +4,11 @@
|
|||
packages = with pkgs; [
|
||||
# Version Control
|
||||
git jujutsu
|
||||
|
||||
# Terminal
|
||||
# kitty # Broken (GLFWindow error)
|
||||
zsh
|
||||
fzf
|
||||
];
|
||||
|
||||
username = "drew";
|
||||
|
@ -26,6 +31,88 @@
|
|||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
|
||||
history = {
|
||||
path = "$HOME/.zsh_history";
|
||||
share = true;
|
||||
size = 10000;
|
||||
save = 10000;
|
||||
};
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ls = "ls --color";
|
||||
ll = "ls -al";
|
||||
la = "ls -a";
|
||||
config="/usr/bin/git --git-dir=/home/drew/.cfg/ --work-tree=/home/drew'";
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
PATH = "$HOME/.cargo/bin:$HOME/opt/cross/bin:$HOME/.local/bin:$PATH";
|
||||
};
|
||||
|
||||
antidote = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"zsh-users/zsh-autosuggestions kind:defer"
|
||||
];
|
||||
};
|
||||
|
||||
initExtraFirst = ''
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "$${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-$${(%):-%n}.zsh" ]]; then
|
||||
source "$${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-$${(%):-%n}.zsh"
|
||||
fi
|
||||
'';
|
||||
|
||||
initExtra = ''
|
||||
setopt extendedglob
|
||||
bindkey -v
|
||||
|
||||
source <(fzf --zsh)
|
||||
|
||||
|
||||
eval $(dircolors ~/.dir_colors)
|
||||
|
||||
# Bind keys
|
||||
typeset -g -A key
|
||||
bindkey -- "^[[H" beginning-of-line
|
||||
bindkey -- "^[[F" end-of-line
|
||||
bindkey -- "^[[1;5C" forward-word
|
||||
bindkey -- "^[[1;5D" backward-word
|
||||
bindkey -- "^[[3~" delete-char
|
||||
|
||||
# Update cursor based on mode
|
||||
function zle-line-init zle-keymap-select {
|
||||
case $KEYMAP in
|
||||
vicmd) echo -n '\e[1 q';;
|
||||
viins|main) echo -n '\e[5 q';;
|
||||
esac
|
||||
}
|
||||
|
||||
zle -N zle-line-init
|
||||
zle -N zle-keymap-select
|
||||
|
||||
# Autocompletion.
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
zstyle ':completion:*' menu select
|
||||
|
||||
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
|
||||
|
||||
source ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
|
@ -33,4 +120,8 @@
|
|||
"kitty/Tomorrow_Night_Eighties.conf".source = ./kitty/Tomorrow_Night_Eighties.conf;
|
||||
"kitty/kitty.conf".source = ./kitty/kitty.conf;
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".p10k.zsh".source = ./zsh/.p10k.zsh;
|
||||
};
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue