dustinlyons / nixos-config

General purpose Nix configuration for macOS / NixOS with starter templates + step-by-step guides ✨
BSD 3-Clause "New" or "Revised" License
1.79k stars 113 forks source link

First time user issue? : error: nixVersions.unstable has been removed. #75

Closed aex-gh closed 6 months ago

aex-gh commented 6 months ago

Hi.

Found your repo when I was researching into nix as a package manager for macOS. Thought I'd give it a shot so been following your README to test out on my Mac Studio M1.

I've tripped across this error that I can't seem to find an answer for when searching and not having the experience in nix having some difficulties in trying to resolve.

I'm running off your starter script and the error I get is when I come to run "nix run .#build" it gives me this:

Running build for aarch64-darwin
Starting build...
error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:9:12:
            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'darwin-system-24.05.20240502.63c3a29+darwin4.230a197'
         whose name attribute is located at /nix/store/p69bcs7ma6ijj8v9xsrg3nq3nn8ryn95-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'activationScript' of derivation 'darwin-system-24.05.20240502.63c3a29+darwin4.230a197'
         at /nix/store/a21fcz0fgrixwrcxw63xccrzjhb6xnym-source/modules/system/default.nix:95:7:
           94|
           95|       activationScript = cfg.activationScripts.script.text;
             |       ^
           96|       activationUserScript = cfg.activationScripts.userScript.text;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: nixVersions.unstable has been removed. For bleeding edge (Nix master, roughly weekly updated) use nixVersions.git, otherwise use nixVersions.latest.

Are you able to offer any insight?

Thanks.

JMiocevich commented 6 months ago

Hey @aex-gh , first time user here on a m1 as well

I resolved for myself by searching and removing 'unstable'. Not sure which one fixed it or any side effects this could cause.

package = pkgs.nixUnstable; package = pkgs.nix;

emacs-unstable emacs

nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable" nixpkgs.url = "github:nixos/nixpkgs"

ratbag98 commented 6 months ago

Been using this successfully for a few weeks and this problem started in the last couple of days. M3 Mac.

dustinlyons commented 6 months ago

Thanks for reporting this. This should be working now.

I updated the flake and changed pkgs.nixUnstable over to pkgs.nix.

I'm okay to forgo the bleeding edge for now.