Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix flake update issue #1270

Open
aspauldingcode opened this issue Jan 14, 2025 · 6 comments
Open

nix flake update issue #1270

aspauldingcode opened this issue Jan 14, 2025 · 6 comments

Comments

@aspauldingcode
Copy link
Contributor

This is definitely not a good title for this issue but.

after updating a universal nix flake, I get nix-darwin error telling me to use nixpkgs-24.11-darwin.

There's a problem. I define everything within all nixos/darwin modules to point to the same nixpkgs input, which I set to either stable or unstable as
nixpkgs/nixos-24.11 or nixpkgs/nixos-unstable.

current flake (working before flake update):
https://github.com/aspauldingcode/.dotfiles/blob/main/flake.nix
the offending change modifies this input:

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; # Set to the desired stable version
    unstable_nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

and requires me to think outside the box. I don't think that warning is enough for users like me to figure out what to do about it.

@aspauldingcode
Copy link
Contributor Author

aspauldingcode commented Jan 14, 2025

more specifically: the error is telling me to use -darwin.
without nixpkgs, I cannot just use the isDarwin or isLinux function to do an if/else sort of thing.

@emilazy
Copy link
Collaborator

emilazy commented Jan 14, 2025

nixos-24.11 will work too (more or less; it’s suboptimal in the way that nixos-unstable is suboptimal, i.e. stuff is more likely to be broken on Darwin, but it will pass the release check).

@emilazy
Copy link
Collaborator

emilazy commented Jan 14, 2025

Did you try following the instructions given? If there’s anything in particular about them you find confusing we can try to explain or reword them to help others in future.

@aspauldingcode
Copy link
Contributor Author

aspauldingcode commented Jan 14, 2025

I think the issue is falsely firing.

I ran a rebuild after switching the channels in my flake right back to nixos ones, and it works fine

@emilazy
Copy link
Collaborator

emilazy commented Jan 14, 2025

I cannot reproduce the issue after cloning your flake and switching the nixpkgs input to nixos-24.11. Can you give full reproduction instructions?

@aspauldingcode
Copy link
Contributor Author

Hi,

I've got rid of the issue by temporarily changing the inputs for nixpkgs and unstable_nixpkgs, rebuilding then changing them back and rebuilding and it's fine.

As far as reproducibility, I have no clue. Seemed to fire just after a nix flake update, that's the only way I know how it happened.

You might have to clone a previous commit, then run nix flake update, then rebuild and see what happens.

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

No branches or pull requests

2 participants