Skip to content

Conversation

@cole-h
Copy link
Member

@cole-h cole-h commented Jan 21, 2025

No description provided.

grahamc and others added 4 commits January 21, 2025 09:06
* Make check creation more modular
* Add check to test `nix.custom.conf` behavior
* Move `checks` to `packages` (so we can build them and do additional checks in GHA)
* Reformat according to nixfmt-rfc-style
@cole-h
Copy link
Member Author

cole-h commented Jan 21, 2025

(Waiting about 2 hours to see if the user in the nix-installer issue above tries it out and sees success, but otherwise I think this is the right approach and will merge with or without their feedback once that time limit has passed)

@teekennedy
Copy link

teekennedy commented Jan 21, 2025

@cole-h I agree that this is the right approach, but unless I'm missing something, it only works for the initial darwin-rebuild switch.

Nix-darwin has a check to see whether /etc/nix/nix.custom.conf's hash matches one known to be generated by determinate nix installer 0.33+. On the first darwin-rebuild switch, the hash matches and nix-darwin overwrites the file. On subsequent runs, nix.custom.conf contains nix-darwin generated config and doesn't match the hash, so it errors out.

I've been working around this by running darwin-rebuild build --flake . && sudo mv /etc/nix/nix.custom.conf /etc/nix/$(date "+%Y-%m-%d_%H:%M:%S")-nix.custom.conf && darwin-rebuild switch --flake . to update my config.

Personally I'm in favor of merging this PR, but this won't be a full solution without some changes to nix-darwin.

@grahamc
Copy link
Member

grahamc commented May 24, 2025

This is released in Determinate 3.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants