dotfiles.nix/hm-configs/fish.nix

42 lines
1.1 KiB
Nix

{ pkgs, ... }: {
enable = true;
package = pkgs.fish;
interactiveShellInit = ''
alias clip="xclip -selection c"
alias cxuse="sudo cachix use -d ~/dotfiles.nix"
alias cxpsh="nix-shell --command exit; nix-store -qR --include-outputs (nix-instantiate shell.nix) | cachix push"
alias cxpush=cxpsh
function config -a file
if test -z "$file"
set file configuration
end
vim ~/dotfiles.nix/$file.nix +'cd %:p:h'
end
alias vims="vim -S Session.vim"
alias bigscreen="xrandr --output eDP1 --off --output HDMI2 --auto"
alias smallscreen="xrandr --output eDP1 --auto --output HDMI2 --off"
function tmux-ssh -a user -a host
set target "$user@$host"
set session "$user-$host"
env TERM=tmux-256color ssh $target -t "tmux -2 attach -t $session || tmux -2 new -s $session"
end
alias pi="tmux-ssh pi pi"
alias mir="tmux-ssh mat mir"
alias drop=mir
alias soviet="tmux-ssh mat soviet"
alias gagarin="tmux-ssh mat gagarin"
alias yuri=gagarin
alias gaga=gagarin
alias wifi="nmcli r w off; nmcli r w on"
alias nixops=~/dev/nixops/result/bin/nixops
'';
}