diff --git a/home-manager/home-manager b/home-manager/home-manager index 63dac595..1667564a 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -29,7 +29,11 @@ function doListGens() { function doListPackages() { local outPath outPath="$(nix-env -q --out-path | grep -o '/.*home-manager-path$')" - nix-store -q --references "$outPath" | sed 's/[^-]*-//' + if [[ -n "$outPath" ]] ; then + nix-store -q --references "$outPath" | sed 's/[^-]*-//' + else + echo "No home-manager packages seem to be installed." + fi } function doHelp() {