Fix nix-index autogenerated db comma integration

This commit is contained in:
2026-01-24 15:01:16 -08:00
parent 83b5d3b8c2
commit e42e30d3cc
2 changed files with 2 additions and 22 deletions

View File

@@ -6,14 +6,11 @@
# - add some handy shell commands
{
environment.systemPackages = with pkgs; [
comma
];
# nix-index
programs.nix-index.enable = true;
programs.nix-index.enableFishIntegration = true;
programs.command-not-found.enable = false;
programs.nix-index-database.comma.enable = true;
programs.fish = {
enable = true;
@@ -35,21 +32,4 @@
llsblk = "lsblk -o +uuid,fsType";
};
nixpkgs.overlays = [
(final: prev: {
# comma uses the "nix-index" package built into nixpkgs by default.
# That package doesn't use the prebuilt nix-index database so it needs to be changed.
comma = prev.comma.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [
prev.makeWrapper
];
postInstall = ''
wrapProgram $out/bin/comma \
--prefix PATH : ${lib.makeBinPath [ prev.fzy config.programs.nix-index.package ]}
ln -s $out/bin/comma $out/bin/,
'';
});
})
];
}