63 lines
1.9 KiB
Nix
Raw Normal View History

2019-08-27 20:49:08 +00:00
{ pkgs, config, ... }: {
environment.pathsToLink = [ "/share/zsh" ];
environment.sessionVariables.SHELL = "zsh";
home-manager.users.alukard.programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
oh-my-zsh = {
enable = true;
theme = "agnoster";
plugins = [ "git" "dirhistory" ];
};
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
2020-02-05 04:30:49 +04:00
src = pkgs.imports.zsh-nix-shell;
2019-08-27 20:49:08 +00:00
}
{
name = "zsh-autosuggestions";
2020-02-05 04:30:49 +04:00
src = pkgs.imports.zsh-autosuggestions;
2019-08-27 20:49:08 +00:00
}
{
name = "you-should-use";
2020-02-05 04:30:49 +04:00
src = pkgs.imports.zsh-you-should-use;
2019-08-27 20:49:08 +00:00
}
];
2019-09-17 02:20:32 +04:00
shellAliases = {
2019-09-17 16:48:59 +04:00
"clr" = "clear";
"weather" = "curl wttr.in/Volzhskiy";
"l" = "ls -lah --group-directories-first";
2019-10-10 19:37:45 +04:00
"rede" = "systemctl --user start redshift.service &";
"redd" = "systemctl --user stop redshift.service &";
"bare" = "systemctl --user start barrier-client.service &";
"bard" = "systemctl --user stop barrier-client.service &";
"wgup" = "_ systemctl start wg-quick-wg0.service";
"wgdown" = "_ systemctl stop wg-quick-wg0.service";
2020-02-07 03:07:59 +04:00
"show-packages" = "_ nix-store -q --references /run/current-system/sw";
2019-09-17 02:20:32 +04:00
};
2019-12-13 23:15:07 +04:00
initExtra = ''
nixify() {
if [ ! -e ./.envrc ]; then
wget -O ./.envrc https://raw.githubusercontent.com/kalbasit/nur-packages/master/pkgs/nixify/envrc
sed -i '$s/use_nix.\+/use_nix/' ./.envrc
direnv allow
fi
if [ ! -e shell.nix ]; then
cat > shell.nix <<'EOF'
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
# Hack to SSL Cert error
GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt;
SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt;
buildInputs = [];
}
EOF
fi
}
'';
2019-08-27 20:49:08 +00:00
};
}