Working on terminal / zsh

This commit is contained in:
2026-03-08 13:32:15 +01:00
parent d9c5e8c449
commit 63d3eb6858
2 changed files with 342 additions and 390 deletions
+334 -358
View File
File diff suppressed because it is too large Load Diff
@@ -1,10 +1,10 @@
{ config, pkgs, lib, user, ... }:
{ config, pkgs, lib, user, flakeRoot, ... }:
let
zshConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/zsh";
assetsDir = "${flakeRoot}/assets/common/conf/zsh";
in
{
home-manager.users.${user.username} = {
# Install zsh-syntax-highlighting
home.packages = with pkgs; [
zsh-syntax-highlighting
starship
@@ -33,36 +33,12 @@ in
};
};
# Consolidated .zshrc
xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [
"# Oh-My-Zsh"
"export ZSH=\"${zshConfigDir}\""
"source \"${pkgs.zsh}/share/zsh/functions/Newuser/zsh-newuser-install\""
"source \"${zshConfigDir}/oh-my-zsh.sh\""
""
"# Zsh options"
"setopt AUTO_CD"
"setopt CORRECT"
"setopt INTERACTIVE_COMMENTS"
""
"# zsh-syntax-highlighting (manually sourced)"
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
""
"# Starship"
"eval \"$(starship init zsh)\""
""
"# fzf"
"source \"${pkgs.fzf}/shell/key-bindings.zsh\""
"source \"${pkgs.fzf}/shell/completion.zsh\""
""
"# User customizations"
"source \"${zshConfigDir}/custom.zsh\" 2>/dev/null"
];
# Use the .zshrc file from assets
xdg.configFile."zsh/.zshrc".source = "${assetsDir}/.zshrc";
# User customizations
xdg.configFile."zsh/custom.zsh".text = ''
export EDITOR="nvim"
export PATH="$HOME/.local/bin:$PATH"
'';
# Create symlinks or copy files from assets to XDG config
xdg.configFile."zsh/custom.zsh".source = "${assetsDir}/custom.zsh";
xdg.configFile."zsh/aliases.zsh".source = "${assetsDir}/aliases.zsh";
xdg.configFile."zsh/history.zsh".source = "${assetsDir}/history.zsh";
};
}