From 5e6bee64325c3a8f922baa07b5192403c0637aaf Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 17 Dec 2023 17:52:59 +0000 Subject: [PATCH] Manage ripgrep with Home Manager --- system/nixos/home-manager/default.nix | 1 - system/shared/home-manager-packages.nix | 1 - system/shared/home-manager.nix | 13 +++++++++---- system/wsl2/default.nix | 1 - 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/system/nixos/home-manager/default.nix b/system/nixos/home-manager/default.nix index f9087df..cc37559 100644 --- a/system/nixos/home-manager/default.nix +++ b/system/nixos/home-manager/default.nix @@ -35,6 +35,5 @@ in LC_CTYPE = "en_GB.UTF-8"; PATH = "$PATH:./vendor/bin:./node_modules/.bin"; PULUMI_SKIP_UPDATE_CHECK = "true"; - RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config"; }; } diff --git a/system/shared/home-manager-packages.nix b/system/shared/home-manager-packages.nix index fc8a9cf..a051d2f 100644 --- a/system/shared/home-manager-packages.nix +++ b/system/shared/home-manager-packages.nix @@ -27,7 +27,6 @@ with pkgs; [ neofetch pkgsUnstable.rustywind pv - ripgrep tldr tree tree-sitter diff --git a/system/shared/home-manager.nix b/system/shared/home-manager.nix index 6a1cbe0..880e0b4 100644 --- a/system/shared/home-manager.nix +++ b/system/shared/home-manager.nix @@ -38,10 +38,15 @@ home.sessionPath = [ "$HOME/.config/bin" ]; - xdg.configFile."ripgrep/config".text = '' - --follow - --smart-case - ''; + programs.ripgrep = { + enable = true; + + arguments = [ + "--follow" + "--hidden" + "--smart-case" + ]; + }; xdg.configFile.bin = { source = ../../bin; diff --git a/system/wsl2/default.nix b/system/wsl2/default.nix index 919a80b..e4d569b 100644 --- a/system/wsl2/default.nix +++ b/system/wsl2/default.nix @@ -18,7 +18,6 @@ inputs.home-manager.lib.homeManagerConfiguration { EXA_COLORS = "uu=38;5;255:gu=38;5;255:ur=38;5;255:uw=38;5;255:ue=38;5;255:wx=38;5;255:gr=38;5;250:gw=38;5;250:gx=38;5;250:tr=38;5;255:tw=38;5;255:tx=38;5;255:da=38;5;250:sn=32:sb=0:di=38;5;105"; PATH = "$PATH:./vendor/bin:./node_modules/.bin"; PULUMI_SKIP_UPDATE_CHECK = "true"; - RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config"; }; } ];