Closed YaroKasear closed 10 months ago
Would you be able to push up this version of your config in a repo on GitHub so I can take a look?
Would you be able to push up this version of your config in a repo on GitHub so I can take a look?
I have it up here. https://github.com/YaroKasear/flakes/tree/main
For now I've reverted on my MacBook back to my pre-snowfall-lib configuration so I can still keep things working there. This library works great on my NixOS box even though I haven't fully migrated yet.
Would you be able to push up this version of your config in a repo on GitHub so I can take a look?
I have it up here. https://github.com/YaroKasear/flakes/tree/main
For now I've reverted on my MacBook back to my pre-snowfall-lib configuration so I can still keep things working there. This library works great on my NixOS box even though I haven't fully migrated yet.
I forgot to update it with the capitalized hostname "Gwyn" instead of "gwyn." But the problem I reported is the same.
Did you make sure to git add
the system when trying to build it for the first time? The only problem I found in the flake is that the nix-darwin input needs to be named darwin
, but Snowfall Lib logs an error mentioning that.
I was able to clone the repo, change nix-darwin to darwin, and then run darwin-rebuild build --flake .#Gwyn
.
I'll also mention that you do not need to add the home-manager module manually. Snowfall Lib will already do that for you 👍
Did you make sure to
git add
the system when trying to build it for the first time? The only problem I found in the flake is that the nix-darwin input needs to be nameddarwin
, but Snowfall Lib logs an error mentioning that.I was able to clone the repo, change nix-darwin to darwin, and then run
darwin-rebuild build --flake .#Gwyn
.
Changed this to 'darwin' and even went as far as a git commit, and no dice.
I tried your variant of the command: darwin-rebuild build --flake .#Gwyn
and got:
building the system configuration...
error: flake 'git+file:///Users/yaro/flakes?ref=refs/heads/main&rev=729b2a2e53a7b71e8ef78c2eb6dd32c21905c5fe' does not provide attribute 'packages.aarch64-darwin.darwinConfigurations.Gwyn.system', 'legacyPackages.aarch64-darwin.darwinConfigurations.Gwyn.system' or 'darwinConfigurations.Gwyn.system'
Did you mean gwyn?
So I tried darwin-rebuild build --flake .#gwyn
and got error: cached failure of attribute 'darwinConfigurations.gwyn.system'
Seems like no matter what this thing hates my hostname.
Did you make sure to
git add
the system when trying to build it for the first time? The only problem I found in the flake is that the nix-darwin input needs to be nameddarwin
, but Snowfall Lib logs an error mentioning that. I was able to clone the repo, change nix-darwin to darwin, and then rundarwin-rebuild build --flake .#Gwyn
.Changed this to 'darwin' and even went as far as a git commit, and no dice.
I tried your variant of the command:
darwin-rebuild build --flake .#Gwyn
and got:building the system configuration... error: flake 'git+file:///Users/yaro/flakes?ref=refs/heads/main&rev=729b2a2e53a7b71e8ef78c2eb6dd32c21905c5fe' does not provide attribute 'packages.aarch64-darwin.darwinConfigurations.Gwyn.system', 'legacyPackages.aarch64-darwin.darwinConfigurations.Gwyn.system' or 'darwinConfigurations.Gwyn.system' Did you mean gwyn?
So I tried
darwin-rebuild build --flake .#gwyn
and goterror: cached failure of attribute 'darwinConfigurations.gwyn.system'
Seems like no matter what this thing hates my hostname.
Okay, so I rm -rv'd the whole thing and cloned a new copy and this one worked. I am starting to suspect I ran into an annoying "quirk" of macOS here.
So what I think happened is the fact that macOS doesn't make its file system case sensitive by default, so that whenever I tried to rename 'gwyn' to 'Gwyn' or the other way, the filesystem basically ignored it, but Nix actually cares about this case sensitivity.
I really appreciate your help.
Ah, I've run into that exact same problem before! It can certainly be difficult to diagnose. Glad you got things working!
I am having a problem getting this lib to work on Apple Silicon macOS with nix-darwin.
darwin-rebuild switch --flake ~/flakes/
yieldserror: flake 'git+file:///Users/yaro/flakes' does not provide attribute 'packages.aarch64-darwin.darwinConfigurations.Gwyn.system', 'legacyPackages.aarch64-darwin.darwinConfigurations.Gwyn.system' or 'darwinConfigurations.Gwyn.system'
My NixOS system has no problem at all with this. Am I missing something basic here?
flake.nix
systems/aarch64-darwin/Gwyn/default.nix
I checked your configs and templates and didn't see anything setting the system variable. I am still working on migrating to snowfall-lib, but as far as I can tell, this should work.