dotnet: don't set $HOME if its already writable
dotnet: don't set $HOME if its already writable

This fixes an issue where the setup hook would overwrite $HOME in a
nix-shell.

Fixes #164450, #164295

NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs