Working on terminal / zsh
This commit is contained in:
+334
-358
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,10 @@
|
|||||||
{ config, pkgs, lib, user, ... }:
|
{ config, pkgs, lib, user, flakeRoot, ... }:
|
||||||
let
|
let
|
||||||
zshConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/zsh";
|
zshConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/zsh";
|
||||||
|
assetsDir = "${flakeRoot}/assets/common/conf/zsh";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home-manager.users.${user.username} = {
|
home-manager.users.${user.username} = {
|
||||||
# Install zsh-syntax-highlighting
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
zsh-syntax-highlighting
|
zsh-syntax-highlighting
|
||||||
starship
|
starship
|
||||||
@@ -33,36 +33,12 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Consolidated .zshrc
|
# Use the .zshrc file from assets
|
||||||
xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [
|
xdg.configFile."zsh/.zshrc".source = "${assetsDir}/.zshrc";
|
||||||
"# 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"
|
|
||||||
];
|
|
||||||
|
|
||||||
# User customizations
|
# Create symlinks or copy files from assets to XDG config
|
||||||
xdg.configFile."zsh/custom.zsh".text = ''
|
xdg.configFile."zsh/custom.zsh".source = "${assetsDir}/custom.zsh";
|
||||||
export EDITOR="nvim"
|
xdg.configFile."zsh/aliases.zsh".source = "${assetsDir}/aliases.zsh";
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
xdg.configFile."zsh/history.zsh".source = "${assetsDir}/history.zsh";
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user