From af5e5a1ffc1d72334131545ae2968094034c3372 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Wed, 5 Jan 2022 11:07:09 +0100 Subject: [PATCH] Use calculate-nix-path helper script --- home.nix | 6 +----- programs/fish.nix | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/home.nix b/home.nix index 55f00cd..225c163 100644 --- a/home.nix +++ b/home.nix @@ -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: " diff --git a/programs/fish.nix b/programs/fish.nix index d94594d..bb8499b 100644 --- a/programs/fish.nix +++ b/programs/fish.nix @@ -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 = {