Nix Flake for my M1 laptop and NixOS desktop computer.
The nix-shell
command is for the first run, afterwards just run home-manager
$ cat /etc/nix/nix.conf
build-users-group = nixbld
trusted-users = root fbs
...
$ nix-shell -p nixUnstable --command "nix build --experimental-features 'nix-command flakes' '.#homeConfigurations.work-m1.activationPackage'"
$ ./result/activate
$ home-manager build --flake .#work-m1
sudo nixos-rebuild switch --flake .