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