def after_apply_all [] { if not ('~/.nix-profile/bin/home-manager' | path exists) { print $"(ansi red)home-manager is not installed(ansi reset)" return } print "Updating with home-manager" ( home-manager switch ) print "Cleaning nix store" ( nix-store --gc ) ignore }