home: Enable Carapace completer
This commit is contained in:
parent
a7a6cfad7e
commit
6baaa0adfe
3 changed files with 20 additions and 9 deletions
10
flake.lock
10
flake.lock
|
@ -451,15 +451,15 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727658919,
|
||||
"narHash": "sha256-YAePt2GldkkRJ08LvZNHcuS6shIVStj+K+1DZN3gbnM=",
|
||||
"owner": "nix-community",
|
||||
"lastModified": 1728233291,
|
||||
"narHash": "sha256-NgJM+KTFCanOeOaa7wKVUeAQbrmFuTN/+n5qrtYjvNI=",
|
||||
"owner": "illdefined",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "f9fdf8285690a351e8998f1e703ebdf9cdf51dee",
|
||||
"rev": "58f75e4917fb5a78a0420127a5252eb36934e322",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"owner": "illdefined",
|
||||
"repo": "nix-index-database",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
};
|
||||
|
||||
nix-index-database = {
|
||||
url = "github:nix-community/nix-index-database";
|
||||
url = "github:illdefined/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
{ self, nur, catppuccin, nix-index-database, niri, ripgrep-all, ... }: { config, lib, pkgs, ... }@args:
|
||||
{ self, nur, catppuccin, nix-index-database, niri, ripgrep-all, ... }:
|
||||
{ config, lib, pkgs, ... }@args:
|
||||
let
|
||||
osConfig = args.osConfig or { };
|
||||
|
||||
bat = lib.getExe config.programs.bat.package;
|
||||
col = lib.getExe' pkgs.util-linux "col";
|
||||
nix-locate = lib.getExe' config.programs.nix-index.package "nix-locate";
|
||||
sh = lib.getExe self.packages.${pkgs.system}.hush;
|
||||
in {
|
||||
imports = [
|
||||
nur.hmModules.nur
|
||||
self.homeModules.greedy
|
||||
self.homeModules.locale-en_EU
|
||||
nix-index-database.hmModules.nix-index
|
||||
catppuccin.homeManagerModules.catppuccin
|
||||
niri.homeModules.config
|
||||
] ++ self.lib.mods [
|
||||
|
@ -36,6 +37,9 @@ in {
|
|||
pointerCursor.enable = true;
|
||||
};
|
||||
|
||||
home.file.".nix-defexpr/channels/nixpkgs/programs.sqlite".source =
|
||||
nix-index-database.packages.${pkgs.system}.nix-channel-index-programs;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Terminfo
|
||||
kitty.terminfo
|
||||
|
@ -69,6 +73,9 @@ in {
|
|||
jaq
|
||||
|
||||
ripgrep-all.packages.${system}.default
|
||||
|
||||
# Required for Carapace nix completer
|
||||
sqlite
|
||||
];
|
||||
|
||||
editorconfig = {
|
||||
|
@ -121,6 +128,8 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
programs.carapace.enable = true;
|
||||
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
icons = true;
|
||||
|
@ -200,6 +209,7 @@ in {
|
|||
'' |> builtins.readFile;
|
||||
in ''
|
||||
load-env {
|
||||
CARAPACE_BRIDGES: `bash`
|
||||
EDITOR: `${lib.getExe config.programs.helix.package}`
|
||||
LS_COLORS: `${ls-colours}`
|
||||
MANROFFOPT: `-c`
|
||||
|
@ -271,7 +281,8 @@ in {
|
|||
|cmd_name| (
|
||||
try {
|
||||
let pkgs = (
|
||||
`${config.programs.nix-index.package}/bin/nix-locate`
|
||||
`${nix-locate}`
|
||||
--db `${nix-index-database.packages.${pkgs.system}.nix-index-database}`
|
||||
--top-level --type x --type s --no-group --whole-name --at-root --minimal
|
||||
$"/bin/($cmd_name)"
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue