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

58 lines
1.5 KiB
Nix
Raw Normal View History

2022-12-30 12:05:46 +00:00
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.features.fish;
in {
options.features.fish.enable = mkEnableOption "enable fish shell";
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
set -x XDG_DATA_HOME $HOME/.local/share
'';
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";
nr = "nixos-rebuild --flake .";
nrs = "nixos-rebuild --flake . switch";
snr = "sudo nixos-rebuild --flake .";
snrs = "sudo nixos-rebuild --flake . switch";
hm = "home-manager --flake .";
hms = "home-manager --flake . switch";
vi = "nvim";
vim = "nvim";
wgd = "sudo systemctl stop wg-quick-wg0.service";
wgu = "sudo systemctl start wg-quick-wg0.service";
};
};
};
}