Unknown error when switching with home-manager

Hello! I’m kinda new to nixos but not new to linux, I was trying to install mpd for my main user, after I added the pkgs.mpd line in my home manager, I got an error and have been unable to switch since then. I messed around for a bit so my files are not in the exact same state that they were when the issue started but the error is still happening with the current config. I’ve spent a lot of time trying to troubleshoot so any help is appreciated.

stack trace:

evaluation warning: fold has been deprecated, use foldr instead
error:
       … while evaluating the attribute 'activationPackage'
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/default.nix:54:3:
           53|
           54|   activationPackage = module.config.home.activationPackage;
             |   ^
           55|

       … from call site
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/default.nix:39:12:
           38|
           39|   module = showWarnings (
             |            ^
           40|     let

       … while calling 'showWarnings'
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/default.nix:18:18:
           17|
           18|   showWarnings = res:
             |                  ^
           19|     let

       … from call site
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/default.nix:22:7:
           21|     in
           22|       fold f res res.config.warnings;
             |       ^
           23|

       … while calling 'foldr'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/lists.nix:138:14:
          137|   foldr =
          138|     op: nul: list:
             |              ^
          139|     let

       … from call site
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/lists.nix:143:5:
          142|     in
          143|     fold' 0;
             |     ^
          144|

       … while calling 'fold''
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/lists.nix:141:15:
          140|       len = length list;
          141|       fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));
             |               ^
          142|     in

       … while evaluating a branch condition
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/lists.nix:141:18:
          140|       len = length list;
          141|       fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));
             |                  ^
          142|     in

       … while calling the 'length' builtin
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/lists.nix:140:13:
          139|     let
          140|       len = length list;
             |             ^
          141|       fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));

       … while evaluating a branch condition
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/default.nix:44:7:
           43|     in
           44|       if failed == []
             |       ^
           45|       then rawModule

       … from call site
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/default.nix:41:16:
           40|     let
           41|       failed = collectFailed rawModule.config;
             |                ^
           42|       failedStr = concatStringsSep "\n" (map (x: "- ${x}") failed);

       … while calling 'collectFailed'
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/default.nix:15:19:
           14|
           15|   collectFailed = cfg:
             |                   ^
           16|     map (x: x.message) (filter (x: !x.assertion) cfg.assertions);

       … while calling the 'map' builtin
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/default.nix:16:5:
           15|   collectFailed = cfg:
           16|     map (x: x.message) (filter (x: !x.assertion) cfg.assertions);
             |     ^
           17|

       … while calling the 'filter' builtin
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/default.nix:16:25:
           15|   collectFailed = cfg:
           16|     map (x: x.message) (filter (x: !x.assertion) cfg.assertions);
             |                         ^
           17|

       … while calling anonymous lambda
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/default.nix:16:33:
           15|   collectFailed = cfg:
           16|     map (x: x.message) (filter (x: !x.assertion) cfg.assertions);
             |                                 ^
           17|

       … in the argument of the not operator
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/default.nix:16:37:
           15|   collectFailed = cfg:
           16|     map (x: x.message) (filter (x: !x.assertion) cfg.assertions);
             |                                     ^
           17|

       … while evaluating the attribute 'assertion'
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/systemd.nix:244:11:
          243|         {
          244|           assertion = enabled -> pkgs.stdenv.isLinux;
             |           ^
          245|           message =

       … in the left operand of the IMPL (->) operator
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/systemd.nix:244:31:
          243|         {
          244|           assertion = enabled -> pkgs.stdenv.isLinux;
             |                               ^
          245|           message =

       … in the right operand of the OR (||) operator
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/systemd.nix:16:7:
           15|       || cfg.mounts != {}
           16|       || cfg.sessionVariables != {};
             |       ^
           17|

       … from call site
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/systemd.nix:16:10:
           15|       || cfg.mounts != {}
           16|       || cfg.sessionVariables != {};
             |          ^
           17|

       … while calling anonymous lambda
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/attrsets.nix:1192:17:
         1191|         mapAttrs (
         1192|           name: value:
             |                 ^
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

       … from call site
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/attrsets.nix:1193:85:
         1192|           name: value:
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
             |                                                                                     ^
         1194|         );

       … while calling anonymous lambda
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:283:71:
          282|           # For definitions that have an associated option
          283|           declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;
             |                                                                       ^
          284|

       … while evaluating the attribute 'value'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1167:7:
         1166|     // {
         1167|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1168|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `systemd.user.sessionVariables':

       … while evaluating the attribute 'mergedValue'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1264:5:
         1263|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
         1264|     mergedValue =
             |     ^
         1265|       if isDefined then

       … while evaluating a branch condition
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1265:7:
         1264|     mergedValue =
         1265|       if isDefined then
             |       ^
         1266|         if type.merge ? v2 then

       … while evaluating the attribute 'values'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1258:11:
         1257|         {
         1258|           values = defsSorted;
             |           ^
         1259|           inherit (defsFiltered) highestPrio;

       … while evaluating a branch condition
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1229:11:
         1228|           # Avoid sorting if we don't have to.
         1229|           if any (def: def.value._type or "" == "order") defsFiltered.values then
             |           ^
         1230|             sortProperties defsFiltered.values

       … while calling the 'any' builtin
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1229:14:
         1228|           # Avoid sorting if we don't have to.
         1229|           if any (def: def.value._type or "" == "order") defsFiltered.values then
             |              ^
         1230|             sortProperties defsFiltered.values

       … from call site
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1224:24:
         1223|         # Process mkOverride properties.
         1224|         defsFiltered = filterOverrides' defsNormalized;
             |                        ^
         1225|

       … while calling anonymous lambda
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1442:5:
         1441|     in
         1442|     defs:
             |     ^
         1443|     # Optimize for the singleton case, equivalent to the `else` clause.

       … while evaluating a branch condition
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1444:5:
         1443|     # Optimize for the singleton case, equivalent to the `else` clause.
         1444|     if length defs == 1 then
             |     ^
         1445|       {

       … while calling the 'length' builtin
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1444:8:
         1443|     # Optimize for the singleton case, equivalent to the `else` clause.
         1444|     if length defs == 1 then
             |        ^
         1445|       {

       … while calling the 'concatMap' builtin
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1209:26:
         1208|         # Process mkMerge and mkIf properties.
         1209|         defsNormalized = concatMap (
             |                          ^
         1210|           m:

       … while calling anonymous lambda
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1210:11:
         1209|         defsNormalized = concatMap (
         1210|           m:
             |           ^
         1211|           map (

       … while calling the 'map' builtin
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1211:11:
         1210|           m:
         1211|           map (
             |           ^
         1212|             value:

       … while evaluating definitions from `/nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/config/i18n.nix':

       … from call site
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1220:80:
         1219|               }
         1220|           ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                ^
         1221|         ) defs;

       … while calling 'dischargeProperties'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1396:5:
         1395|   dischargeProperties =
         1396|     def:
             |     ^
         1397|     if def._type or "" == "merge" then

       … while evaluating a branch condition
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1397:5:
         1396|     def:
         1397|     if def._type or "" == "merge" then
             |     ^
         1398|       concatMap dischargeProperties def.contents

       … while evaluating the attribute 'value'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:849:21:
          848|             inherit (module) file;
          849|             inherit value;
             |                     ^
          850|           }) module.config

       … while evaluating a branch condition
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/config/i18n.nix:29:16:
           28|   # lookup the version of glibcLocales and set the appropriate environment vars
           29|   localeVars = if versionAtLeast version "2.27" then {
             |                ^
           30|     LOCALE_ARCHIVE_2_27 = archivePath;

       … from call site
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/config/i18n.nix:29:19:
           28|   # lookup the version of glibcLocales and set the appropriate environment vars
           29|   localeVars = if versionAtLeast version "2.27" then {
             |                   ^
           30|     LOCALE_ARCHIVE_2_27 = archivePath;

       … while calling 'versionAtLeast'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/strings.nix:1989:24:
         1988|   */
         1989|   versionAtLeast = v1: v2: !versionOlder v1 v2;
             |                        ^
         1990|

       … in the argument of the not operator
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/strings.nix:1989:29:
         1988|   */
         1989|   versionAtLeast = v1: v2: !versionOlder v1 v2;
             |                             ^
         1990|

       … from call site
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/strings.nix:1989:29:
         1988|   */
         1989|   versionAtLeast = v1: v2: !versionOlder v1 v2;
             |                             ^
         1990|

       … while calling 'versionOlder'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/strings.nix:1955:22:
         1954|   */
         1955|   versionOlder = v1: v2: compareVersions v2 v1 == 1;
             |                      ^
         1956|

       … while calling the 'compareVersions' builtin
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/strings.nix:1955:26:
         1954|   */
         1955|   versionOlder = v1: v2: compareVersions v2 v1 == 1;
             |                          ^
         1956|

       … while evaluating the second argument passed to builtins.compareVersions

       … from call site
         at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/config/i18n.nix:24:12:
           23|
           24|   inherit (pkgs.glibcLocales) version;
             |            ^
           25|

       … while calling anonymous lambda
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:725:15:
          724|       extraArgs = mapAttrs (
          725|         name: _:
             |               ^
          726|         addErrorContext (context name) (

       … while evaluating the module argument `pkgs' in "/nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/config/i18n.nix":

       … noting that argument `pkgs` is not externally provided, so querying `_module.args` instead, requiring `config`

       … from call site
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:729:13:
          728|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          729|             config._module.args.${name}
             |             ^
          730|           )

       … while calling anonymous lambda
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/types.nix:891:18:
          890|             value = mapAttrs (
          891|               n: v:
             |                  ^
          892|               if lazy then

       … while evaluating the attribute 'optionalValue.value'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1330:5:
         1329|
         1330|     optionalValue = if isDefined then { value = mergedValue; } else { };
             |     ^
         1331|   };

       … while evaluating a branch condition
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1330:21:
         1329|
         1330|     optionalValue = if isDefined then { value = mergedValue; } else { };
             |                     ^
         1331|   };

       … while evaluating the attribute 'values'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1258:11:
         1257|         {
         1258|           values = defsSorted;
             |           ^
         1259|           inherit (defsFiltered) highestPrio;

       … while evaluating a branch condition
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1229:11:
         1228|           # Avoid sorting if we don't have to.
         1229|           if any (def: def.value._type or "" == "order") defsFiltered.values then
             |           ^
         1230|             sortProperties defsFiltered.values

       … while calling the 'any' builtin
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1229:14:
         1228|           # Avoid sorting if we don't have to.
         1229|           if any (def: def.value._type or "" == "order") defsFiltered.values then
             |              ^
         1230|             sortProperties defsFiltered.values

       … while evaluating the attribute 'values'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1454:9:
         1453|       {
         1454|         values = concatMap (def: if getPrio def == highestPrio then [ (strip def) ] else [ ]) defs;
             |         ^
         1455|         inherit highestPrio;

       … while calling the 'concatMap' builtin
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1454:18:
         1453|       {
         1454|         values = concatMap (def: if getPrio def == highestPrio then [ (strip def) ] else [ ]) defs;
             |                  ^
         1455|         inherit highestPrio;

       … while calling anonymous lambda
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1454:29:
         1453|       {
         1454|         values = concatMap (def: if getPrio def == highestPrio then [ (strip def) ] else [ ]) defs;
             |                             ^
         1455|         inherit highestPrio;

       … while evaluating a branch condition
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1454:34:
         1453|       {
         1454|         values = concatMap (def: if getPrio def == highestPrio then [ (strip def) ] else [ ]) defs;
             |                                  ^
         1455|         inherit highestPrio;

       … while calling the 'foldl'' builtin
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1451:23:
         1450|       let
         1451|         highestPrio = foldl' (prio: def: min (getPrio def) prio) 9999 defs;
             |                       ^
         1452|       in

       … while calling anonymous lambda
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1451:37:
         1450|       let
         1451|         highestPrio = foldl' (prio: def: min (getPrio def) prio) 9999 defs;
             |                                     ^
         1452|       in

       … from call site
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1451:42:
         1450|       let
         1451|         highestPrio = foldl' (prio: def: min (getPrio def) prio) 9999 defs;
             |                                          ^
         1452|       in

       … while calling 'min'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/trivial.nix:595:12:
          594|   */
          595|   min = x: y: if x < y then x else y;
             |            ^
          596|

       … while evaluating a branch condition
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/trivial.nix:595:15:
          594|   */
          595|   min = x: y: if x < y then x else y;
             |               ^
          596|

       … while calling the 'lessThan' builtin
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/trivial.nix:595:20:
          594|   */
          595|   min = x: y: if x < y then x else y;
             |                    ^
          596|

       … from call site
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1451:47:
         1450|       let
         1451|         highestPrio = foldl' (prio: def: min (getPrio def) prio) 9999 defs;
             |                                               ^
         1452|       in

       … while calling 'getPrio'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1438:9:
         1437|       getPrio =
         1438|         def: if def.value._type or "" == "override" then def.value.priority else defaultOverridePriority;
             |         ^
         1439|       strip =

       … while evaluating the attribute 'value.priority'
         at /nix/store/dc8pflkwyicx6zhhcmffg9fz5isy64ak-nixos-26.05/nixos/lib/modules.nix:1584:13:
         1583|     _type = "override";
         1584|     inherit priority content;
             |             ^
         1585|   };

       error: attribute 'defaultPriority' missing
       at /nix/store/gmkk60hz3n5cwhpkw45pxqb8138lfykx-home-manager-21.05.tar.gz/home-manager/modules/misc/nixpkgs.nix:145:25:
          144|     _module.args = {
          145|       pkgs = mkOverride modules.defaultPriority _pkgs;
             |                         ^
          146|       pkgs_i686 =

home.nix:

{ config, pkgs, ... }:
{
    home.username = "me";
    home.homeDirectory = "/home/me";
    home.packages = [
      pkgs.tree
      pkgs.zoxide
      pkgs.screen
    ];

    programs.home-manager.enable = true;
    home.stateVersion = "26.05";
}

configuration.nix:

{ config, lib, pkgs, inputs, ... }:

let
    home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-26.05.tar.gz;
in

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      "${home-manager}/nixos"
    ];

  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  networking.hostName = "optiplex"; # Define your hostname.

  networking.networkmanager.enable = true;

  time.timeZone = "Etc/UTC";

  services.xserver.xkb.layout = "us";
  services.xserver.xkb.options = "ctrl:swapcaps";

  services.printing.enable = true;

  users.users.me = {
    isNormalUser = true;
    extraGroups = [ "wheel" "media" "docker" ];
  };
  home-manager.users.me = { pkgs, ... }: {
    home.stateVersion = "26.05";
  };
  users.users.me.uid = 1000;
  users.groups.media.gid = 1000;

  users.users.gen = {
    isNormalUser = true;
    extraGroups = [ "wheel" "media" "docker" ];
  };
  home-manager.users.gen = { pkgs, ... }: {
    home.stateVersion = "26.05";
  };
  users.users.gen.uid = 1111;


  environment.systemPackages = with pkgs; [
    neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
    zsh
    oh-my-zsh
    wget
    mpd
    docker
    nginx
    jdk21
  ];

  users.defaultUserShell = pkgs.zsh;
  programs.zsh.enable = true;
  virtualisation.docker.enable = true;

  home-manager.backupFileExtension = "backup";

  services.openssh = {
    enable = true;
  };
  services.nginx.enable = true;

  networking.firewall.allowedTCPPorts = [22 25565];
  networking.firewall.allowedUDPPorts = [22 25565];

  system.copySystemConfiguration = true;

  system.stateVersion = "26.05"; # Did you read the comment?

}

hardware-configuration.nix:

{
  imports =
    [ (modulesPath + "/installer/scan/not-detected.nix")
    ];

  boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
  boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.extraModulePackages = [ ];

  fileSystems."/" =
    { device = "/dev/disk/by-uuid/a8816bb3-cfea-4498-9b5a-c1adddeb98e5";
      fsType = "ext4";
    };

  fileSystems."/boot" =
    { device = "/dev/disk/by-uuid/6754-33BC";
      fsType = "vfat";
      options = [ "fmask=0077" "dmask=0077" ];
    };

  swapDevices =
    [ { device = "/dev/disk/by-uuid/e3599f64-907b-4a4b-bc68-eb7c9358505d"; }
    ];

  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

I’m not sure precisely why you’re seeing this, but I suspect it’s a clue. Version mismatch between nixpkgs and home-manager can cause a number of problems, particularly when using the nixos module.

I recommend against using unpinned fetchTarball inputs like this for this kind of reason. You can’t control updates, and can’t even rebuild the same thing you built before. Whatever happens out there on the web goes into your config automatically, and you don’t even have a record of what versions worked in the past or how to get them back. Use a channel for home-manager instead.

I can not see that line.

I see inputs here, which is a hint for flake usage.

I do see an unlocked evaltime fetcher here, which is a hint against flakes.

I can’t find where you import this file in your system config

The trace looks as if it was cut off.

Can you share the full config, preferably in a git repo? Tell us what exact nixpkgs is used as input (ideally down to the commit or tarball URL).

As I mentioned unfortunately part of me trying to solve this issue was removing that line which did not work.

I don’t understand what this means. Again I’m brand new to nixos, so I don’t really understand what you mean by flakes.

This line does seem like the problem as someone else has mentioned. I thought it might be but when I was looking up how to install home-manager, one of the options was to use this fetchtarball and it was the only thing that actually ended up working on my system for some reason. I will retry the installation and see if i can get the other methods to work.

It’s my home-manager home.nix so it gets used through that.

This is the exact trace it gave me.

What do you mean by exact nixpkgs? What input?

This worked! I removed and/or commented all references to home-manager in my root config and installed through channels and nix-shell '<home-manager>' -A install to install it. Thank you for your help!

Note that this means you’re using home-manager in standalone mode. That implies that packages in your home directory need to be updated separately from the system packages.

Installing home-manager that way is quite confusing for newcomers, you can still use the channel and install it with the NixOS module by following this page.