Cannot upgrade to 24.11

NOTE: I use nix flake

After pointing nixpkgs and home-manager to 24.11 as below, still cannot rebuild the system

inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
    home-manager = {
      url = "github:nix-community/home-manager/release-24.11";
      inputs.nixpkgs.follows = "nixpkgs";
    };
};

here is the trace error message

error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'nixos-rebuild'
         whose name attribute is located at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/pkgs/stdenv/generic/make-derivation.nix:336:7

       … while evaluating attribute 'substitutions' of derivation 'nixos-rebuild'

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/pkgs/build-support/substitute/substitute.nix:54:3:

           53| } // args // lib.optionalAttrs (args ? substitutions) {
           54|   substitutions =
             |   ^
           55|     assert lib.assertMsg (lib.isList args.substitutions) ''

       … from call site

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/pkgs/build-support/substitute/substitute.nix:57:5:

           56|       pkgs.substitute: For "${name}", `substitutions` is passed, which is expected to be a list, but it's a ${builtins.typeOf args.substitutions} instead.'';
           57|     lib.escapeShellArgs args.substitutions;
             |     ^
           58| })

       … while calling 'concatMapStringsSep'

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/lib/strings.nix:232:5:

          231|     f:
          232|     list: concatStringsSep sep (map f list);
             |     ^
          233|

       … while calling 'escapeShellArg'

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/lib/strings.nix:1056:20:

         1055|   */
         1056|   escapeShellArg = arg:
             |                    ^
         1057|     let

       … while calling anonymous lambda

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/lib/attrsets.nix:1204:18:

         1203|         mapAttrs
         1204|           (name: value:
             |                  ^
         1205|             if isAttrs value && cond value

       … from call site

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/lib/attrsets.nix:1207:18:

         1206|             then recurse (path ++ [ name ]) value
         1207|             else f (path ++ [ name ]) value);
             |                  ^
         1208|     in

       … while calling anonymous lambda

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/lib/modules.nix:254:72:

          253|           # For definitions that have an associated option
          254|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          255|

       … while evaluating the option `nix.package':

       … while calling anonymous lambda

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/lib/modules.nix:831:28:

          830|         # Process mkMerge and mkIf properties.
          831|         defs' = concatMap (m:
             |                            ^
          832|           map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating definitions from `/nix/store/ygswgrkcrmvx3k92xqjf9x3ppflb827v-source/configuration.nix':

       … from call site

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/lib/modules.nix:832:128:

          831|         defs' = concatMap (m:
          832|           map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                ^
          833|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/lib/modules.nix:903:25:

          902|   */
          903|   dischargeProperties = def:
             |                         ^
          904|     if def._type or "" == "merge" then

       … while calling anonymous lambda

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/pkgs/top-level/aliases.nix:51:11:

           50|     lib.mapAttrs
           51|       (n: alias:
             |           ^
           52|         removeDistribute

       … from call site

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/pkgs/top-level/aliases.nix:52:9:

           51|       (n: alias:
           52|         removeDistribute
             |         ^
           53|           (removeRecurseForDerivations

       … while calling 'removeDistribute'

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/pkgs/top-level/aliases.nix:32:22:

           31|   # sets from building on Hydra.
           32|   removeDistribute = alias:
             |                      ^
           33|     if lib.isDerivation alias then

       … from call site

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/pkgs/top-level/aliases.nix:33:8:

           32|   removeDistribute = alias:
           33|     if lib.isDerivation alias then
             |        ^
           34|       lib.dontDistribute alias

       … while calling 'isDerivation'

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/lib/attrsets.nix:1282:5:

         1281|   isDerivation =
         1282|     value: value.type or null == "derivation";
             |     ^
         1283|

       … from call site

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/pkgs/top-level/aliases.nix:53:12:

           52|         removeDistribute
           53|           (removeRecurseForDerivations
             |            ^
           54|             (checkInPkgs n alias)))

       … while calling 'removeRecurseForDerivations'

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/pkgs/top-level/aliases.nix:25:33:

           24|   # to appear while listing all the packages available.
           25|   removeRecurseForDerivations = alias:
             |                                 ^
           26|     if alias.recurseForDerivations or false

       … from call site

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/pkgs/top-level/aliases.nix:54:14:

           53|           (removeRecurseForDerivations
           54|             (checkInPkgs n alias)))
             |              ^
           55|       aliases;

       … while calling 'checkInPkgs'

         at /nix/store/sqmn1ky3k66661h32djyjvsr8l99330z-source/pkgs/top-level/aliases.nix:44:20:

           43|   # Make sure that we are not shadowing something from all-packages.nix.
           44|   checkInPkgs = n: alias:
             |                    ^
           45|     if builtins.hasAttr n super

       error: 'nixFlakes' has been renamed to/replaced by 'nixVersions.stable'

This is the relevant error.
You probably use nixFlakes somewhere in your code, I replaced it like this in my code, maybe it works for you as well: Remove nixFlakes package · 6b8e373c6a - nixos - Gitea: Git with a cup of tea

1 Like

In fact you can just unset nix.package, any nix in the past 3-4 years has flakes.

1 Like

Indeed, I’m probably too tired last night, rg and failed to find that.