From 4131b5512b1085f3146d9bf95304d028352acce2 Mon Sep 17 00:00:00 2001 From: Nydragon Date: Sun, 29 Sep 2024 03:37:20 +0200 Subject: [PATCH] chore: move some fish abbr to nixpkgs --- home/terminal/fish/default.nix | 11 ++--------- modules/default.nix | 1 + modules/programs/fish.nix | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 modules/programs/fish.nix diff --git a/home/terminal/fish/default.nix b/home/terminal/fish/default.nix index 155d9d1..033685c 100644 --- a/home/terminal/fish/default.nix +++ b/home/terminal/fish/default.nix @@ -4,16 +4,9 @@ enable = true; shellAbbrs = { clip = "wl-copy"; - l = "eza -laa"; - ls = "eza -la"; - ll = "eza -l"; - cat = "bat"; + sd = ''cd "$(dirname "$HOME/$(env --chdir ~ fzf)")"''; - mkdir = "mkdir --parent"; - cp = "cp -vi"; - mv = "mv -vi"; - rm = "rm -v"; - nrepl = "nix repl --expr 'import {}'"; + }; functions = { gitignore = "curl -sL https://www.gitignore.io/api/$argv"; diff --git a/modules/default.nix b/modules/default.nix index 00e8f4f..165eab4 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -17,6 +17,7 @@ ./programs/steam.nix ./programs/hyprland.nix ./programs/ssh.nix + ./programs/fish.nix ./system/printing.nix ./system/audio.nix diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix new file mode 100644 index 0000000..4480b89 --- /dev/null +++ b/modules/programs/fish.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +{ + users.defaultUserShell = pkgs.fish; + + programs.fish = { + enable = true; + shellAbbrs = { + mkdir = "mkdir --parent"; + cp = "cp -vi"; + mv = "mv -vi"; + rm = "rm -v"; + nrepl = "nix repl --expr 'import {}'"; + l = "eza -laa"; + ls = "eza -la"; + ll = "eza -l"; + cat = "bat"; + }; + }; +}