From df06ae515f130e4e54d2ddfb780406f736e9b7bf Mon Sep 17 00:00:00 2001 From: Krzysztof Saczuk Date: Fri, 31 May 2024 09:33:39 +0200 Subject: [PATCH] feat(shell): add `nix-index` cmd --- configuration.nix | 1 + modules/shell/nix.nix | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 modules/shell/nix.nix diff --git a/configuration.nix b/configuration.nix index 52ef153..926f265 100644 --- a/configuration.nix +++ b/configuration.nix @@ -134,6 +134,7 @@ hardware.grub.enable = true; shell = { tmux.enable = true; + nix.enable = true; direnv.enable = true; starship.enable = true; fish = { diff --git a/modules/shell/nix.nix b/modules/shell/nix.nix new file mode 100644 index 0000000..b172909 --- /dev/null +++ b/modules/shell/nix.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + ... +}: +with lib; +with lib.my; let + cfg = config.modules.shell.nix; +in { + options.modules.shell.nix = { + enable = mkEnableOption "nix shell integrations"; + }; + + config = mkIf (cfg.enable) { + programs = { + command-not-found.enable = false; + nix-index.enable = true; + }; + }; +}