1
0
Fork 0

Use calculate-nix-path helper script

This commit is contained in:
Daniel Kempkens 2022-01-05 11:07:09 +01:00
parent db2cd1d524
commit af5e5a1ffc
2 changed files with 2 additions and 6 deletions

View file

@ -53,11 +53,7 @@
updateAppCaches = lib.hm.dag.entryAfter [ "onFilesChange" "installPackages" "copyFonts" ] ''
# nixpkgs
echo "Calculating new NIX_PATH value ..."
mkdir -p "$HOME/.cache/fish"
nix flake metadata ~/.config/nixpkgs --json 2>/dev/null | \
jq -r '.locks.nodes.nixpkgs.locked | "\(.type):\(.owner)/\(.repo)/\(.rev)"' | \
xargs -I {} nix flake metadata {} --json | \
jq -r '. | "nixpkgs=\(.path)"' >"$HOME/.cache/fish/nix_path_value"
"$HOME/.bin/calculate-nix-path"
# neovim
echo -n "Running LuaCacheClear: "

View file

@ -39,7 +39,7 @@
yti = "ytdl_with_options -F";
upa = "nix flake update ~/.config/nixpkgs -v";
upn = "$HOME/.config/nixpkgs/programs/nvim/update-plugins.sh";
ucl = "nix-collect-garbage -d && nix-store --gc && nix-store --optimise -v";
ucl = "nix-collect-garbage -d && nix-store --gc && nix-store --optimise -v && calculate-nix-path";
};
functions = {