diff --git a/flake.nix b/flake.nix index 17e6615..d280573 100644 --- a/flake.nix +++ b/flake.nix @@ -127,10 +127,7 @@ ]; programs.zsh = { enable = true; - shellAliases = { - g = "${pkgs.git}/bin/git"; - }; - }; + } // (import ./home/shellcommon.nix); home.stateVersion = "21.11"; }; } diff --git a/home.nix b/home.nix index f54d719..4ee6557 100644 --- a/home.nix +++ b/home.nix @@ -50,16 +50,6 @@ rec { }; bash = { enable = true; - shellAliases = { - g = "${pkgs.git}/bin/git"; - t = "${pkgs.tig}/bin/tig"; - l = "${pkgs.exa}/bin/exa"; - ll = "${pkgs.exa}/bin/exa -l"; - ls = "l"; - pux = "sh -c \"tmux -S $(pwd).tmux attach\""; - pux-iterm = "sh -c \"tmux -S $(pwd).tmux -CC attach\""; - }; - sessionVariables = { }; # XXX: These are needed only on non-NixOS Linux (on NixOS, they are broken) #bashrcExtra = '' # . ~/.nix-profile/etc/profile.d/nix.sh @@ -70,7 +60,7 @@ rec { # source "$completion_script" # done #''; - }; + } // (import ./home/shellcommon.nix); direnv = { enable = true; diff --git a/home/shellcommon.nix b/home/shellcommon.nix new file mode 100644 index 0000000..65d2340 --- /dev/null +++ b/home/shellcommon.nix @@ -0,0 +1,12 @@ +{ + shellAliases = { + g = "${pkgs.git}/bin/git"; + t = "${pkgs.tig}/bin/tig"; + l = "${pkgs.exa}/bin/exa"; + ll = "${pkgs.exa}/bin/exa -l"; + ls = "l"; + pux = "sh -c \"tmux -S $(pwd).tmux attach\""; + pux-iterm = "sh -c \"tmux -S $(pwd).tmux -CC attach\""; + }; + sessionVariables = { }; +}