Add fish module to nix
This commit is contained in:
@@ -11,16 +11,14 @@
|
||||
targets.genericLinux.enable = pkgs.stdenv.isLinux;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Defined in Xonsh overlay
|
||||
xonsh_with_plugins
|
||||
# Jump to directories
|
||||
zoxide
|
||||
# Better cat
|
||||
bat
|
||||
# Better find
|
||||
fd
|
||||
# Better df
|
||||
duf
|
||||
# Better top
|
||||
htop
|
||||
fzf
|
||||
ncdu
|
||||
@@ -34,6 +32,7 @@
|
||||
];
|
||||
|
||||
imports = [
|
||||
./modules/fish
|
||||
./modules/git.nix
|
||||
./modules/direnv.nix
|
||||
./modules/emacs.nix
|
||||
|
||||
45
nix/modules/fish/default.nix
Normal file
45
nix/modules/fish/default.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
options = ["--cmd j"];
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
shellInit = ''
|
||||
set --universal fish_greeting
|
||||
set -g -x EDITOR "emacsclient"
|
||||
set -g -x ALTERNATE_EDITOR "vim"
|
||||
set -g -x TERMINAL "kitty"
|
||||
set -g -x MANPAGER less -x
|
||||
|
||||
fish_add_path --path ~/.dotfiles/bin ~/.local/bin ~/bin
|
||||
|
||||
# TODO - Adjust for nix-managed Doom if I ever do that
|
||||
fish_add_path ~/.emacs.d/bin
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
ec = "emacsclient -n --alternate-editor=emacs";
|
||||
pubip = "curl icanhazip.com";
|
||||
src = "source ~/.config/fish/config.fish && clear";
|
||||
redesktop = "kquitapp5 plasmashell && kstart5 plasmashell";
|
||||
pulsefix = "pulseaudio --kill; pulseaudio --start";
|
||||
};
|
||||
};
|
||||
|
||||
# TODO -- port from Xonsh config
|
||||
# $MANPAGER = "less -X"
|
||||
# $LESS = "--ignore-case --QUIET --RAW-CONTROL-CHARS"
|
||||
#
|
||||
#
|
||||
# if $TERM == "xterm-kitty":
|
||||
# # Wrap ssh with environment variable because servers tend to deal poorly with kitty
|
||||
# def xterm_ssh(args):
|
||||
# $TERM="xterm-256color" ssh @(args)
|
||||
#
|
||||
# aliases["ssh"] = xterm_ssh
|
||||
}
|
||||
Reference in New Issue
Block a user