From ab5542e9dbd13d0100f8baae2bc2d68af901f4b4 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 14 Apr 2024 09:46:58 +0200 Subject: [PATCH] home-environment: support recent Nix versions Recent Nix versions fail when running `nix profile remove` with no argument. If packages are externally managed, and we have nothing to remove, do not run the `nix profile remove` command. --- modules/home-environment.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home-environment.nix b/modules/home-environment.nix index 870464608..53441dd05 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -589,7 +589,7 @@ in nix profile list \ | { grep 'home-manager-path$' || test $? = 1; } \ | cut -d ' ' -f 4 \ - | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG + | xargs -rt $DRY_RUN_CMD nix profile remove $VERBOSE_ARG else if nix-env -q | grep '^home-manager-path$'; then $DRY_RUN_CMD nix-env -e home-manager-path