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

56 lines
1.4 KiB
Plaintext
Raw Normal View History

2023-02-07 08:29:30 +00:00
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.features.cli.fish;
in {
options.features.cli.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";
ncb 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";
};
};
};
}