Move zsh config to its own file.

This commit is contained in:
vorboyvo 2024-05-09 00:49:01 -04:00
parent 894e9610e0
commit bd7593cb13
2 changed files with 17 additions and 15 deletions

View file

@ -8,6 +8,7 @@ in {
imports = [
./programs/kdeconnect.nix
./programs/ssh.nix
./programs/zsh.nix
];
home.username = "alice";
home.homeDirectory = "/home/alice";
@ -132,21 +133,6 @@ in {
programs.home-manager.enable = true;
# Enabling bash from home-manager means environment variables set by HM get set correctly
# Worst case, fallback to bash.
programs.zsh = {
enable = true;
initExtra = ''
# Set prompt
PS1='%(?..[%?] )%B%F{green}[%n@%m %~]%(!.#.$)%f%b '
'';
profileExtra = ''
export VISUAL=nvim
# If running from tty1 start sway
[ "$(tty)" = "/dev/tty1" ] && exec sway
'';
};
programs.git = {
enable = true;
userName = "vorboyvo";

16
programs/zsh.nix Normal file
View file

@ -0,0 +1,16 @@
{
# Enabling bash from home-manager means environment variables set by HM get set correctly
# Worst case, fallback to bash.
programs.zsh = {
enable = true;
initExtra = ''
# Set prompt
PS1='%(?..[%?] )%B%F{green}[%n@%m %~]%(!.#.$)%f%b '
'';
profileExtra = ''
export VISUAL=nvim
# If running from tty1 start sway
[ "$(tty)" = "/dev/tty1" ] && exec sway
'';
};
}