be a bit smarter about fzf module

This commit is contained in:
Grigory Shipunov 2023-01-22 23:07:29 +01:00
parent c16ef44b2d
commit a2732c6e6a
Signed by: 0xa
GPG key ID: 91FA5E5BF9AA901C
4 changed files with 18 additions and 12 deletions

View file

@ -57,7 +57,7 @@
./hosts/toaster ./hosts/toaster
./modules/basic-tools.nix ./modules/basic-tools
./modules/binary-caches.nix ./modules/binary-caches.nix
./modules/devtools.nix ./modules/devtools.nix
./modules/gnupg.nix ./modules/gnupg.nix
@ -77,7 +77,7 @@
./hosts/microwave ./hosts/microwave
./modules/basic-tools.nix ./modules/basic-tools
./modules/binary-caches.nix ./modules/binary-caches.nix
./modules/devtools.nix ./modules/devtools.nix
./modules/gnupg.nix ./modules/gnupg.nix
@ -93,7 +93,7 @@
modules = [ modules = [
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
./hosts/cirrus ./hosts/cirrus
./modules/basic-tools.nix ./modules/basic-tools
]; ];
}; };
@ -104,7 +104,7 @@
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
microvm.nixosModules.host microvm.nixosModules.host
./hosts/dishwasher ./hosts/dishwasher
./modules/basic-tools.nix ./modules/basic-tools
./modules/binary-caches.nix ./modules/binary-caches.nix
{ {

View file

@ -13,14 +13,6 @@
audacity audacity
yt-dlp yt-dlp
]; ];
# integrate fzf into shell, >23.05 only
# to be moved to basic tools at some point
programs = {
fzf = {
keybindings = true;
fuzzyCompletion = true;
};
};
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;

View file

@ -1,6 +1,10 @@
{ lib, config, pkgs, inputs, ... }: { lib, config, pkgs, inputs, ... }:
{ {
imports = [
./fzf.nix
];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
bat bat
fd fd

View file

@ -0,0 +1,10 @@
{ lib, config, ... }: {
# integrate fzf into shell, >23.05 only
programs =
if (lib.toInt (lib.elemAt (lib.splitVersion config.system.nixos.release) 0) >= 23) then {
fzf = {
keybindings = true;
fuzzyCompletion = true;
};
} else { };
}