summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGrigory Shipunov2023-01-24 14:27:50 +0100
committerGrigory Shipunov2023-01-24 14:27:50 +0100
commit22f3630c57b5a674eadd32b12796210f6b479a62 (patch)
tree18ac192760c31a4e9a0cb1668219b617a69e2df7 /modules
parent02e404da775bb92f42f00b59578f2852aee07299 (diff)
refactor fzf a bit
Diffstat (limited to 'modules')
-rw-r--r--modules/basic-tools/default.nix3
-rw-r--r--modules/basic-tools/fzf.nix14
2 files changed, 11 insertions, 6 deletions
diff --git a/modules/basic-tools/default.nix b/modules/basic-tools/default.nix
index 8725e38..fe088ab 100644
--- a/modules/basic-tools/default.nix
+++ b/modules/basic-tools/default.nix
@@ -9,7 +9,6 @@
bat
fd
file
- fzf
git
gnupg
htop
@@ -69,8 +68,6 @@
ll = "ls -lah";
lt = "ls --tree";
vim = "nvim";
- vf = "$EDITOR $(fzf)";
- vff = "$EDITOR $(ls|fzf)";
mutt = "neomutt";
grep = "grep --color=auto";
nix-build="${pkgs.nix-output-monitor}/bin/nom-build";
diff --git a/modules/basic-tools/fzf.nix b/modules/basic-tools/fzf.nix
index 5e0ce0e..6fc84fe 100644
--- a/modules/basic-tools/fzf.nix
+++ b/modules/basic-tools/fzf.nix
@@ -1,7 +1,15 @@
-{ lib, config, ... }: {
+{ lib, config, pkgs, ... }: {
+
+ environment = {
+ systemPackages = [ pkgs.fzf ];
+ shellAliases = {
+ vf = "$EDITOR $(fzf)";
+ vff = "$EDITOR $(ls|fzf)";
+ };
+ };
# integrate fzf into shell, >23.05 only
- programs =
- if (lib.toInt (lib.elemAt (lib.splitVersion config.system.nixos.release) 0) >= 23) then {
+ programs = with lib;
+ if (toInt (elemAt (splitVersion config.system.nixos.release) 0) >= 23) then {
fzf = {
keybindings = true;
fuzzyCompletion = true;