From bd7593cb13ef8c56dc1cf8bdb07faadb76bcd52f Mon Sep 17 00:00:00 2001 From: vorboyvo Date: Thu, 9 May 2024 00:49:01 -0400 Subject: [PATCH] Move zsh config to its own file. --- home.nix | 16 +--------------- programs/zsh.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 programs/zsh.nix diff --git a/home.nix b/home.nix index 0b71163..9f42bb6 100644 --- a/home.nix +++ b/home.nix @@ -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"; diff --git a/programs/zsh.nix b/programs/zsh.nix new file mode 100644 index 0000000..895ccfc --- /dev/null +++ b/programs/zsh.nix @@ -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 + ''; + }; +}