Files
nixos/Droidnix/generated/modules/traveldroid/apps/zsh.nix
T
2026-03-30 13:09:05 +00:00

54 lines
1.2 KiB
Nix

{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
generatedZsh = "${flakeRoot}/generated/.config/zsh/.zshrc";
in
{
#################################
# Install Zsh system-wide
#################################
environment.systemPackages = [
pkgs.zsh
];
#################################
# Home Manager user configuration
#################################
home-manager.users = {
${username} = {
programs.zsh = {
enable = true;
enableCompletion = true;
autocd = true;
oh-my-zsh = {
enable = true;
theme = "";
plugins = [
"git"
"sudo"
"extract"
"colored-man-pages"
"command-not-found"
"history"
"docker"
"kubectl"
];
};
enableAutosuggestions = true;
enableSyntaxHighlighting = true;
};
# Use ~/.config/zsh as ZDOTDIR
home.sessionVariables = {
ZDOTDIR = "${config.homeDirectory}/.config/zsh";
};
# Deploy the generated .zshrc
home.file.".config/zsh/.zshrc".source = generatedZsh;
};
};
}