forked from ners/NixOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzsh.nix
34 lines (31 loc) · 837 Bytes
/
zsh.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ config, pkgs, ... }:
{
users.defaultUserShell = pkgs.zsh;
programs.zsh = {
enable = true;
autosuggestions.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
interactiveShellInit = ''
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
eval "$(${pkgs.starship}/bin/starship init zsh)"
eval "$(${pkgs.direnv}/bin/direnv hook zsh)"
'';
shellAliases = {
open = "xdg-open";
vim = "nvim";
gvim = "nvim-qt";
make = "make -j$(nproc)";
makevars = "make -pn | grep -A1 '^# makefile' | grep -v '^#\\|^--' | sort | uniq";
scp = "scp -F $HOME/.ssh/config";
ssh = "ssh -F $HOME/.ssh/config";
sshfs = "sshfs -F $HOME/.ssh/config";
};
promptInit = "";
};
environment.systemPackages = with pkgs; [
direnv
nix-direnv
];
environment.pathsToLink = [ "/share/nix-direnv" ];
}