From 81e70ccbd21d7e7c66ce9ca40fdd46f48dc70daf Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Fri, 20 Dec 2024 11:54:44 -0500 Subject: [PATCH] Separate out nix-index.nix for clarity --- modules/home/all/nix-index.nix | 21 +++++++++++++++++++++ modules/home/all/terminal.nix | 16 +--------------- modules/home/default.nix | 1 + 3 files changed, 23 insertions(+), 15 deletions(-) create mode 100644 modules/home/all/nix-index.nix diff --git a/modules/home/all/nix-index.nix b/modules/home/all/nix-index.nix new file mode 100644 index 0000000..178e8da --- /dev/null +++ b/modules/home/all/nix-index.nix @@ -0,0 +1,21 @@ +# Platform-independent terminal setup +{ flake, ... }: + +let + inherit (flake) inputs; +in +{ + imports = [ + inputs.nix-index-database.hmModules.nix-index + ]; + + programs = { + # Command not found handler based on nixpkgs + nix-index-fork = { + enable = true; + enableZshIntegration = true; + enableNixCommand = true; + }; + nix-index-database.comma.enable = true; + }; +} diff --git a/modules/home/all/terminal.nix b/modules/home/all/terminal.nix index ff1c77c..f9ed8b7 100644 --- a/modules/home/all/terminal.nix +++ b/modules/home/all/terminal.nix @@ -1,13 +1,7 @@ # Platform-independent terminal setup -{ flake, pkgs, ... }: +{ pkgs, ... }: -let - inherit (flake) inputs; -in { - imports = [ - inputs.nix-index-database.hmModules.nix-index - ]; home.packages = with pkgs; [ # Unixy tools ripgrep @@ -60,14 +54,6 @@ in }; programs = { - # Command not found handler based on nixpkgs - nix-index-fork = { - enable = true; - enableZshIntegration = true; - enableNixCommand = true; - }; - nix-index-database.comma.enable = true; - lsd = { enable = true; enableAliases = true; diff --git a/modules/home/default.nix b/modules/home/default.nix index b042f2d..a1f5230 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -7,6 +7,7 @@ ./all/ssh.nix ./all/starship.nix ./all/terminal.nix + ./all/nix-index.nix ./all/nix.nix ./all/git.nix ./all/direnv.nix