From 4733c0244999a325a3ff0f34766ea4d6280f8558 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 8 Apr 2023 11:08:04 -0400 Subject: [PATCH] split terminal config --- home/bash.nix | 3 +++ home/default.nix | 23 ++++------------------- home/nushell.nix | 8 ++++++++ home/zsh.nix | 17 +++++++++++++++++ 4 files changed, 32 insertions(+), 19 deletions(-) create mode 100644 home/bash.nix create mode 100644 home/nushell.nix create mode 100644 home/zsh.nix diff --git a/home/bash.nix b/home/bash.nix new file mode 100644 index 0000000..c5d43d2 --- /dev/null +++ b/home/bash.nix @@ -0,0 +1,3 @@ +{ + programs.bash.enable = true; +}; diff --git a/home/default.nix b/home/default.nix index b8e1fe5..5ea3167 100644 --- a/home/default.nix +++ b/home/default.nix @@ -11,39 +11,24 @@ ./terminal.nix ./direnv.nix ./zellij.nix + ./nushell.nix ]; - programs.nushell = { - enable = true; - envFile.source = ./nushell/env.nu; - configFile.source = ./nushell/config.nu; - }; }; common-linux = { imports = [ self.homeModules.common + ./bash.nix ./vscode-server.nix ]; - programs.bash.enable = true; }; common-darwin = { imports = [ self.homeModules.common + ./zsh.nix # ./emacs.nix ]; - programs.zsh.enable = true; - # This must be envExtra (rather than initExtra), because doom-emacs requires it - # https://github.com/doomemacs/doomemacs/issues/687#issuecomment-409889275 - # - # But also see: 'doom env', which is what works. - programs.zsh.envExtra = '' - export PATH=/etc/profiles/per-user/$USER/bin:/run/current-system/sw/bin/:$PATH - # For 1Password CLI. This requires `pkgs.gh` to be installed. - source $HOME/.config/op/plugins.sh - # Because, adding it in .ssh/config is not enough. - # cf. https://developer.1password.com/docs/ssh/get-started#step-4-configure-your-ssh-or-git-client - export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock - ''; + }; }; }; diff --git a/home/nushell.nix b/home/nushell.nix new file mode 100644 index 0000000..ea5903b --- /dev/null +++ b/home/nushell.nix @@ -0,0 +1,8 @@ +{ + + programs.nushell = { + enable = true; + envFile.source = ./nushell/env.nu; + configFile.source = ./nushell/config.nu; + }; +} diff --git a/home/zsh.nix b/home/zsh.nix new file mode 100644 index 0000000..409444c --- /dev/null +++ b/home/zsh.nix @@ -0,0 +1,17 @@ +{ ... }: + +{ + programs.zsh.enable = true; + # This must be envExtra (rather than initExtra), because doom-emacs requires it + # https://github.com/doomemacs/doomemacs/issues/687#issuecomment-409889275 + # + # But also see: 'doom env', which is what works. + programs.zsh.envExtra = '' + export PATH=/etc/profiles/per-user/$USER/bin:/run/current-system/sw/bin/:$PATH + # For 1Password CLI. This requires `pkgs.gh` to be installed. + source $HOME/.config/op/plugins.sh + # Because, adding it in .ssh/config is not enough. + # cf. https://developer.1password.com/docs/ssh/get-started#step-4-configure-your-ssh-or-git-client + export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock + ''; +}