Files
nixos/Droidnix/generated/system/applications/terminal_shell/zsh.nix
T
2026-03-08 13:32:15 +01:00

45 lines
1.2 KiB
Nix

{ 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} = {
home.packages = with pkgs; [
zsh-syntax-highlighting
starship
];
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
theme = "agnoster";
plugins = [
"git"
"docker"
"kubectl"
"history"
"command-not-found"
"extract"
];
};
shellAliases = {
ls = "exa --icons -a --group-directories-first";
ll = "exa --icons -la --group-directories-first";
};
};
# Use the .zshrc file from assets
xdg.configFile."zsh/.zshrc".source = "${assetsDir}/.zshrc";
# 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";
};
}