Install nix with Determinate Nix Installer:
curl -fsSL https://install.determinate.systems/nix | sh -s -- installFlake support should be enabled by default. Then install nh
nix shell 'nixpkgs#nh'To make sure the nix pick up the cache:
# if you use DeterminateSystems installer
echo 'trusted-users = root @wheel @sudo' | sudo tee -a /etc/nix/nix.custom.conf
# make sure restart the nix-daemon
sudo systemctl restart nix-daemonYou can switch to the home configuration defined in this directory by running:
# in case that cache miss happens, you can set the negative ttl to 0 to avoid waiting for the cache to expire
# `-b` is for enabling the backup extension, which will backup the existing file that are not managed by home-manager.
nh home switch . -c <username>@<hostname> -b --accept-flake-config -- --option narinfo-cache-negative-ttl 0