refactor: centralise home-manager configs in system configs

This commit is contained in:
Mohammad Rafiq 2025-03-27 04:02:14 +08:00
parent bb6da9ccb0
commit 3d04d338d1
No known key found for this signature in database
54 changed files with 667 additions and 628 deletions

View file

@ -1,7 +1,41 @@
{pkgs, ...}: {
{
pkgs,
...
}:
{
programs.zsh = {
enable = true;
};
users.defaultUserShell = pkgs.zsh;
environment.pathsToLink = ["/share/zsh"]; # enables completion
environment.pathsToLink = [ "/share/zsh" ]; # enables completion
home-manager.users.rafiq = {
programs.zsh = {
enable = true;
enableCompletion = true;
enableVteIntegration = true;
dirHashes = {
repos = "$HOME/GitRepos";
dl = "$HOME/Downloads";
};
initContent = # zsh
''
# Bind CTRL+Backspace to delete whole word
bindkey '^H' backward-kill-word
'';
# TODO: Look into whether we need to add the history attribute
profileExtra = # bash
''
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
dbus-run-session Hyprland
fi
'';
plugins = [
{
name = "vi-mode";
src = pkgs.zsh-vi-mode;
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
}
];
};
};
}