From 8cd3771da004711c5ca02bc075d15e86de54860e Mon Sep 17 00:00:00 2001 From: Patrick Date: Mon, 18 Sep 2023 13:04:44 +0200 Subject: [PATCH] feat(zsh): added nix-index and comma --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 4 ++++ modules/config/home-manager.nix | 3 ++- users/common/shells/zsh/default.nix | 9 +++++++-- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index d5bc693..ff02378 100644 --- a/flake.lock +++ b/flake.lock @@ -336,6 +336,26 @@ "type": "github" } }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1694921880, + "narHash": "sha256-yU36cs5UdzhTwsM9bUWUz43N//ELzQ1ro69C07pU/8E=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "9d2bcc47110b3b6217dfebd6761ba20bc78aedf2", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, "nixlib": { "locked": { "lastModified": 1693701915, @@ -509,6 +529,7 @@ "flake-utils": "flake-utils", "home-manager": "home-manager", "impermanence": "impermanence", + "nix-index-database": "nix-index-database", "nixos-generators": "nixos-generators", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 1cea754..333aa68 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,10 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.systems.follows = "systems"; }; + nix-index-database = { + url = "github:nix-community/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { diff --git a/modules/config/home-manager.nix b/modules/config/home-manager.nix index e0f0faf..d98126e 100644 --- a/modules/config/home-manager.nix +++ b/modules/config/home-manager.nix @@ -1,6 +1,6 @@ { stateVersion, - config, + inputs, ... }: { home-manager = { @@ -11,6 +11,7 @@ { home.stateVersion = stateVersion; } + inputs.nix-index-database.hmModules.nix-index ]; }; # HM zsh needs this or else the startup order is fucked diff --git a/users/common/shells/zsh/default.nix b/users/common/shells/zsh/default.nix index 3257cde..378523f 100644 --- a/users/common/shells/zsh/default.nix +++ b/users/common/shells/zsh/default.nix @@ -17,9 +17,14 @@ # has to be enabled to support zsh reverse search programs.fzf.enable = true; - programs.carapace.enable = true; + programs.carapace = { + enable = true; + # this would source all completers sadly some are worse than the builtin completers + enableZshIntegration = false; + }; - programs.command-not-found.enable = true; + programs.nix-index.enable = true; + programs.nix-index-database.comma.enable = true; programs.zsh = { enable = true; dotDir = ".config/zsh";