Closed bonds closed 2 months ago
The issue here I would guess is that you put quotes around your machine name. e.g. the line
"accismus" = nix-darwin.lib.darwinSystem {
Try without the "" there
Huh, that worked. :) Thank you!
I think this is just a workaround. I think nh ought to have dealt with this. If it should that is a bug/feature for the upstream nh not nh_darwin.
The actual reason is that on macOS gethostname
call returns the FQDN, causing nh_darwin
to read that. However, darwin-rebuild
calls scutil --get LocalHostName
which returns just the hostname part.
Github shows the pull request as closed, but I did cherry-pick @thecaralice's commit. I rebased on upstream before seeing their PR and didn't want to force them to resolve conflicts. @bonds update your input to get the feature.
It works! Thanks @ToyVo !
Before installing I used
darwin-rebuild switch --flake .
and it worked fine:Then I tried nh_darwin and I got an error:
from my flake.nix:
and
So...maybe nix-darwin knows to ignore the .local in the hostname but nh doesn't? Not sure what the workaround is...I can't seem to remove the .local from my hostname in macos, so for now I'm just falling back to
darwin-rebuild
.