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

61 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.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
set -x XDG_DATA_HOME $HOME/.local/share
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";
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";
};
};
};
}