nix-configurations/home/features/cli/fish.nix

70 lines
1.9 KiB
Nix
Raw Normal View History

2022-12-30 12:05:46 +00:00
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.features.cli.fish;
2022-12-30 12:05:46 +00:00
in {
options.features.cli.fish.enable = mkEnableOption "enable fish shell";
2022-12-30 12:05:46 +00:00
config = mkIf cfg.enable {
programs.fish = {
enable = true;
plugins = [{
name = "foreign-env";
src = pkgs.fetchFromGitHub {
owner = "oh-my-fish";
repo = "plugin-foreign-env";
rev = "dddd9213272a0ab848d474d0cbde12ad034e65bc";
sha256 = "00xqlyl3lffc5l0viin1nyp819wf81fncqyz87jx8ljjdhilmgbs";
};
}];
loginShellInit = ''
set -x WEBKIT_DISABLE_COMPOSITING_MODE 1
set -x EDITOR emacsclient
set -x VISUAL emacsclient
2023-06-17 15:03:03 +00:00
set -x TERMINAL alacritty
2022-12-30 12:05:46 +00:00
set -x XDG_DATA_HOME $HOME/.local/share
2023-04-29 04:47:39 +00:00
set -x FZF_ALT_C_COMMAND fd --type d --exclude .git --follow --hidden
set -x FZF_DEFAULT_COMMAND fd --type f --exclude .git --follow --hidden
set -x FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
2023-04-09 09:12:23 +00:00
if test (tty) = "/dev/tty1"
exec Hyprland &> /dev/null
end
2022-12-30 12:05:46 +00:00
'';
shellAbbrs = {
ls = "exa";
grep = "rg";
ps = "procs";
n = "nix";
nd = "nix develop -c $SHELL";
ns = "nix shell";
nsn = "nix shell nixpkgs#";
nb = "nix build";
nbn = "nix build nixpkgs#";
nf = "nix flake";
2023-06-13 04:20:48 +00:00
nr = "sudo nixos-rebuild --flake .";
nrs = "sudo nixos-rebuild switch --flake .#$HOSTNAME";
2022-12-30 12:05:46 +00:00
snr = "sudo nixos-rebuild --flake .";
snrs = "sudo nixos-rebuild --flake . switch";
hm = "home-manager --flake .";
hms = "home-manager --flake . switch";
2023-06-13 04:20:48 +00:00
tsu = "sudo tailscale up";
tsd = "sudo tailscale down";
2022-12-30 12:05:46 +00:00
vi = "nvim";
vim = "nvim";
wgd = "sudo systemctl stop wg-quick-wg0.service";
wgu = "sudo systemctl start wg-quick-wg0.service";
2023-06-13 04:20:48 +00:00
2022-12-30 12:05:46 +00:00
};
};
};
}