"infinite recursion encountered" when adding my rust binary release

drwxr-xr-x    - saidler 17 Apr 18:23 .
.rw-r--r-- 3.1k saidler  2 Apr 16:26 ├── .gitignore
.rw-r--r-- 6.8k saidler 15 Apr 12:26 ├── configuration.nix
drwxr-xr-x    - saidler  4 Apr 16:07 ├── HOME
.rw-r--r-- 4.1k saidler  2 Apr 16:26 │  ├── .bash_prompt
.rw-r--r-- 4.2k saidler  4 Apr 16:07 │  ├── .bashrc
drwxr-xr-x    - saidler  4 Apr 21:55 │  ├── .config
drwxr-xr-x    - saidler  4 Apr 15:07 │  │  ├── aka
.rw-r--r--  14k saidler  4 Apr 15:07 │  │  │  └── aka.yml
drwxr-xr-x    - saidler  2 Apr 16:26 │  │  ├── clone
.rw-r--r--  415 saidler  2 Apr 16:26 │  │  │  └── clone.cfg
drwxr-xr-x    - saidler  4 Apr 21:55 │  │  ├── nvim
.rw-r--r--  37k saidler  4 Apr 21:53 │  │  │  └── init.lua
drwxr-xr-x    - saidler  2 Apr 16:26 │  │  ├── pip
.rw-r--r--  159 saidler  2 Apr 16:26 │  │  │  └── pip.conf
drwxr-xr-x    - saidler  2 Apr 16:26 │  │  ├── rmrf
.rw-r--r--  168 saidler  2 Apr 16:26 │  │  │  └── rmrf.cfg
drwxr-xr-x    - saidler  2 Apr 16:26 │  │  └── tmp
.rw-r--r--  10k saidler  2 Apr 16:26 │  │     └── tmp.yml
.rw-r--r-- 2.7k saidler  2 Apr 16:26 │  ├── .expand-aka
.rw-r--r-- 2.2k saidler  2 Apr 16:26 │  ├── .gitconfig
.rwxr-xr-x  591 saidler  2 Apr 16:26 │  ├── .gitconfig-ssh
.rw-r--r--  194 saidler  2 Apr 16:26 │  ├── .gitconfig-work
drwxr-xr-x    - saidler  2 Apr 16:26 │  ├── .gnupg
.rw-r--r--   35 saidler  2 Apr 16:26 │  │  └── gpg.conf
drwxr-xr-x    - saidler  2 Apr 16:26 │  ├── .local
drwxr-xr-x    - saidler  2 Apr 16:26 │  │  └── share
drwxr-xr-x    - saidler  2 Apr 16:26 │  │     └── applications
.rw-r--r-- 9.6k saidler  2 Apr 16:26 │  │        ├── .obsidian.png
.rw-r--r--  514 saidler  2 Apr 16:26 │  │        └── Obsidian.desktop
.rw-r--r-- 7.6k saidler  2 Apr 16:26 │  ├── .rustfmt.toml
.rw-r--r-- 1.4k saidler  2 Apr 16:26 │  ├── .shell-aliases
.rw-r--r--  832 saidler  2 Apr 16:26 │  ├── .shell-exports
drwxr-xr-x    - saidler  2 Apr 16:26 │  ├── .shell-exports.d
.rw-r--r--  333 saidler  2 Apr 16:26 │  │  └── rust.env
.rw-r--r--  347 saidler  2 Apr 16:26 │  ├── .shell-functions
drwxr-xr-x    - saidler  2 Apr 16:26 │  ├── .ssh
.rw-r--r--  425 saidler  2 Apr 16:26 │  │  └── config
.rw-r--r--  485 saidler  2 Apr 16:26 │  ├── .ssh-ident
.rw-r--r--  928 saidler  2 Apr 16:26 │  ├── .tmux.conf
.rw-r--r--  15k saidler  2 Apr 16:26 │  ├── .vimrc
drwxr-xr-x    - saidler  2 Apr 16:26 │  ├── .zsh
drwxr-xr-x    - saidler  2 Apr 16:26 │  │  └── functions
.rw-r--r-- 1.2k saidler  2 Apr 16:26 │  │     └── _exercism
.rw-r--r--   25 saidler  2 Apr 16:26 │  └── .zsh-dircolors.config
.rw-r--r-- 8.8k saidler 17 Apr 17:44 ├── home.nix
.rw-r--r-- 1.1k saidler  2 Apr 16:26 ├── LICENSE
drwxr-xr-x    - saidler 15 Apr 15:42 ├── modules
.rw-r--r--  123 saidler 15 Apr 15:42 │  ├── default.nix
drwxr-xr-x    - saidler 12 Apr 22:52 │  ├── firefox
.rw-r--r-- 4.5k saidler 12 Apr 22:52 │  │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 19:25 │  ├── neovim
drwxr-xr-x    - saidler 14 Apr 19:24 │  │  ├── config
.rw-r--r--  787 saidler 14 Apr 19:24 │  │  │  ├── autocmds.lua
.rw-r--r-- 3.4k saidler 12 Apr 22:53 │  │  │  ├── mappings.lua
.rw-r--r-- 1.2k saidler 14 Apr 19:23 │  │  │  ├── options.lua
drwxr-xr-x    - saidler 14 Apr 08:42 │  │  │  └── setup
.rw-r--r--  136 saidler 12 Apr 22:53 │  │  │     ├── chatgpt.lua
.rw-r--r-- 2.3k saidler 12 Apr 22:53 │  │  │     ├── cmp.lua
.rw-r--r-- 3.2k saidler 14 Apr 08:42 │  │  │     ├── dap.lua
.rw-r--r--  226 saidler 12 Apr 22:53 │  │  │     ├── diagnostic.lua
.rw-r--r-- 2.6k saidler 12 Apr 22:53 │  │  │     ├── lspconfig.lua
.rw-r--r-- 8.3k saidler 14 Apr 08:41 │  │  │     ├── luasnip.lua
.rw-r--r-- 2.4k saidler 12 Apr 22:53 │  │  │     ├── neoai.lua
.rw-r--r--  355 saidler 12 Apr 22:53 │  │  │     ├── neorg.lua
.rw-r--r--  453 saidler 12 Apr 22:53 │  │  │     ├── telescope.lua
.rw-r--r-- 1.6k saidler 12 Apr 22:53 │  │  │     └── treesitter.lua
.rw-r--r-- 7.4k saidler 14 Apr 19:25 │  │  └── default.nix
drwxr-xr-x    - saidler 19 Apr 13:57 │  └── repos
.rw-r--r--  353 saidler 19 Apr 13:57 │     ├── default.nix
drwxr-xr-x    - saidler 15 Apr 15:44 │     └── scottidler
drwxr-xr-x    - saidler 15 Apr 07:40 │        ├── aka
.rw-r--r-- 1.1k saidler 15 Apr 08:32 │        │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 22:55 │        ├── cert-tools
.rw-r--r--  819 saidler 14 Apr 22:55 │        │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 19:26 │        ├── dock
.rw-r--r--  355 saidler 14 Apr 19:26 │        │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 15:48 │        ├── git
.rw-r--r-- 1.3k saidler 14 Apr 15:48 │        │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 23:11 │        ├── helpful
.rw-r--r--  850 saidler 14 Apr 23:11 │        │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 18:01 │        ├── repo
.rw-r--r-- 1.1k saidler 14 Apr 18:01 │        │  └── default.nix
drwxr-xr-x    - saidler 19 Apr 14:09 │        ├── requote
.rw-r--r-- 1.0k saidler 19 Apr 14:09 │        │  └── default.nix
drwxr-xr-x    - saidler 17 Apr 18:08 │        ├── rmrf
.rw-r--r--  610 saidler 15 Apr 13:26 │        │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 16:03 │        └── tmp
.rw-r--r--  575 saidler 14 Apr 16:03 │           └── default.nix
.rw-r--r--   40 saidler  2 Apr 16:26 └── README.md

my configuration.nix

my home.nix

my modules/default.nix

my modules/repos/default.nix

my modules/repos/scottidler/requote/default.nix

building Nix...
building the system configuration...
error:
       … while calling anonymous lambda

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/attrsets.nix:918:24:

          917|     let f = attrPath:
          918|       zipAttrsWith (n: values:
             |                        ^
          919|         let here = attrPath ++ [n]; in

       … while calling 'g'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/attrsets.nix:701:19:

          700|           g =
          701|             name: value:
             |                   ^
          702|             if isAttrs value && cond value

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/attrsets.nix:704:20:

          703|               then recurse (path ++ [name]) value
          704|               else f (path ++ [name]) value;
             |                    ^
          705|         in mapAttrs g;

       … while calling anonymous lambda

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:242:72:

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

       … while evaluating the option `system.build.toplevel':

       … while calling anonymous lambda

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:822:28:

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

       … while evaluating definitions from `/nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/nixos/modules/system/activation/top-level.nix':

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:823:137:

          822|         defs' = concatMap (m:
          823|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          824|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:894:25:

          893|   */
          894|   dischargeProperties = def:
             |                         ^
          895|     if def._type or "" == "merge" then

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/nixos/modules/system/activation/top-level.nix:71:12:

           70|   # Replace runtime dependencies
           71|   system = foldr ({ oldDependency, newDependency }: drv:
             |            ^
           72|       pkgs.replaceDependency { inherit oldDependency newDependency drv; }

       … while calling 'foldr'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/lists.nix:53:20:

           52|   */
           53|   foldr = op: nul: list:
             |                    ^
           54|     let

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/lists.nix:60:8:

           59|         else op (elemAt list n) (fold' (n + 1));
           60|     in fold' 0;
             |        ^
           61|

       … while calling 'fold''

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/lists.nix:56:15:

           55|       len = length list;
           56|       fold' = n:
             |               ^
           57|         if n == len

       … while calling 'g'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/attrsets.nix:701:19:

          700|           g =
          701|             name: value:
             |                   ^
          702|             if isAttrs value && cond value

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/attrsets.nix:704:20:

          703|               then recurse (path ++ [name]) value
          704|               else f (path ++ [name]) value;
             |                    ^
          705|         in mapAttrs g;

       … while calling anonymous lambda

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:242:72:

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

       … while evaluating the option `assertions':

       … while calling anonymous lambda

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:822:28:

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

       … while evaluating definitions from `/nix/store/8g24vl583cmgh9p6mpcw3myjyh71nzcm-home-manager-23.11.tar.gz/home-manager/nixos/common.nix':

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:823:137:

          822|         defs' = concatMap (m:
          823|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          824|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:894:25:

          893|   */
          894|   dischargeProperties = def:
             |                         ^
          895|     if def._type or "" == "merge" then

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:900:11:

          899|         if def.condition then
          900|           dischargeProperties def.content
             |           ^
          901|         else

       … while calling 'dischargeProperties'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:894:25:

          893|   */
          894|   dischargeProperties = def:
             |                         ^
          895|     if def._type or "" == "merge" then

       … from call site

         at /nix/store/8g24vl583cmgh9p6mpcw3myjyh71nzcm-home-manager-23.11.tar.gz/home-manager/nixos/common.nix:109:20:

          108|
          109|       assertions = flatten (flip mapAttrsToList cfg.users (user: config:
             |                    ^
          110|         flip map config.assertions (assertion: {

       … while calling 'flatten'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/lists.nix:186:13:

          185|   */
          186|   flatten = x:
             |             ^
          187|     if isList x

       … while calling anonymous lambda

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/lists.nix:188:21:

          187|     if isList x
          188|     then concatMap (y: flatten y) x
             |                     ^
          189|     else [x];

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/lists.nix:188:24:

          187|     if isList x
          188|     then concatMap (y: flatten y) x
             |                        ^
          189|     else [x];

       … while calling 'flatten'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/lists.nix:186:13:

          185|   */
          186|   flatten = x:
             |             ^
          187|     if isList x

       … while calling anonymous lambda

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/attrsets.nix:615:10:

          614|     attrs:
          615|     map (name: f name attrs.${name}) (attrNames attrs);
             |          ^
          616|

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/attrsets.nix:615:16:

          614|     attrs:
          615|     map (name: f name attrs.${name}) (attrNames attrs);
             |                ^
          616|

       … while calling anonymous lambda

         at /nix/store/8g24vl583cmgh9p6mpcw3myjyh71nzcm-home-manager-23.11.tar.gz/home-manager/nixos/common.nix:109:66:

          108|
          109|       assertions = flatten (flip mapAttrsToList cfg.users (user: config:
             |                                                                  ^
          110|         flip map config.assertions (assertion: {

       … from call site

         at /nix/store/8g24vl583cmgh9p6mpcw3myjyh71nzcm-home-manager-23.11.tar.gz/home-manager/nixos/common.nix:110:9:

          109|       assertions = flatten (flip mapAttrsToList cfg.users (user: config:
          110|         flip map config.assertions (assertion: {
             |         ^
          111|           inherit (assertion) assertion;

       … while calling 'flip'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/trivial.nix:138:16:

          137|   */
          138|   flip = f: a: b: f b a;
             |                ^
          139|

       … while calling anonymous lambda

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/types.nix:557:22:

          556|       merge = loc: defs:
          557|         mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
             |                      ^
          558|             (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:844:59:

          843|       if isDefined then
          844|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                                                           ^
          845|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while calling 'merge'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/types.nix:778:22:

          777|         check = x: isAttrs x || isFunction x || path.check x;
          778|         merge = loc: defs:
             |                      ^
          779|           (base.extendModules {

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:242:28:

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

       … while calling 'mapAttrsRecursiveCond'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/attrsets.nix:696:5:

          695|     # Attribute set to recursively map over.
          696|     set:
             |     ^
          697|     let

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:234:33:

          233|           ({ inherit lib options config specialArgs; } // specialArgs);
          234|         in mergeModules prefix (reverseList collected);
             |                                 ^
          235|

       … while calling 'reverseList'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/lists.nix:510:17:

          509|   */
          510|   reverseList = xs:
             |                 ^
          511|     let l = length xs; in genList (n: elemAt xs (l - n - 1)) l;

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:229:25:

          228|       merged =
          229|         let collected = collectModules
             |                         ^
          230|           class

       … while calling anonymous lambda

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:443:37:

          442|
          443|     in modulesPath: initialModules: args:
             |                                     ^
          444|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:444:7:

          443|     in modulesPath: initialModules: args:
          444|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
             |       ^
          445|

       … while calling 'filterModules'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:411:36:

          410|       # modules recursively. It returns the final list of unique-by-key modules
          411|       filterModules = modulesPath: { disabled, modules }:
             |                                    ^
          412|         let

       … while calling anonymous lambda

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:437:31:

          436|           disabledKeys = concatMap ({ file, disabled }: map (moduleKey file) disabled) disabled;
          437|           keyFilter = filter (attrs: ! elem attrs.key disabledKeys);
             |                               ^
          438|         in map (attrs: attrs.module) (builtins.genericClosure {

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:398:22:

          397|           let
          398|             module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
             |                      ^
          399|             collectedImports = collectStructuredModules module._file module.key module.imports args;

       … while calling anonymous lambda

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:363:11:

          362|         else
          363|           m: m;
             |           ^
          364|

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:398:35:

          397|           let
          398|             module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
             |                                   ^
          399|             collectedImports = collectStructuredModules module._file module.key module.imports args;

       … while calling 'loadModule'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:334:53:

          333|       # Like unifyModuleSyntax, but also imports paths and calls functions if necessary
          334|       loadModule = args: fallbackFile: fallbackKey: m:
             |                                                     ^
          335|         if isFunction m then

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:336:11:

          335|         if isFunction m then
          336|           unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgs fallbackKey m args)
             |           ^
          337|         else if isAttrs m then

       … while calling 'unifyModuleSyntax'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:452:34:

          451|      of ‘options’, ‘config’ and ‘imports’ attributes. */
          452|   unifyModuleSyntax = file: key: m:
             |                                  ^
          453|     let

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:336:55:

          335|         if isFunction m then
          336|           unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgs fallbackKey m args)
             |                                                       ^
          337|         else if isAttrs m then

       … while calling 'applyModuleArgs'

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:489:29:

          488|
          489|   applyModuleArgs = key: f: args@{ config, options, lib, ... }:
             |                             ^
          490|     let

       … from call site

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:513:8:

          512|       # works.
          513|     in f (args // extraArgs);
             |        ^
          514|

       … while calling anonymous lambda

         at /home/saidler/.config/home-manager/modules/repos/scottidler/requote/default.nix:3:1:

            2|
            3| { stdenv, fetchurl, autoPatchelfHook, gcc, glibc, lib, libgcc, ... }:
             | ^
            4|

       … while calling anonymous lambda

         at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:504:44:

          503|       context = name: ''while evaluating the module argument `${name}' in "${key}":'';
          504|       extraArgs = builtins.mapAttrs (name: _:
             |                                            ^
          505|         builtins.addErrorContext (context name)

       … while evaluating the module argument `stdenv' in ":anon-5:anon-1:anon-1:anon-3:anon-6":

       error: infinite recursion encountered

       at /nix/store/ny99c1v764126f7sx0avv68ibz9i6qbf-nixos-23.11/nixos/lib/modules.nix:506:28:

          505|         builtins.addErrorContext (context name)
          506|           (args.${name} or config._module.args.${name})
             |                            ^
          507|       ) (lib.functionArgs f);

This is the recursive error that I get and I am not sure how to fix my config and address this error. Any help would be appreciated. Including pointing out if I am doing this in entirely the wrong way. I am somewhat new to Nixos and would be grateful for any help. Thanks

I removed the the ellipses ‘…’ and then added in the unexpected argument as the error messages complained about it.

error: function ‘anonymous lambda’ called with unexpected argument ‘osConfig’

# modules/repos/scottidler/requote/default.nix

{ lib, stdenv, fetchurl, 
config, options, specialArgs, modulesPath, nixosConfig, osConfig }:

let
  version = "0.1.4";
  src = fetchurl {
    url = "https://github.com/scottidler/requote/releases/download/v${version}/requote-v${version}-linux.tar.gz";
    sha256 = "0495c72na8njy8gx6y43nzsv16532k7hfaf3r9g46ycjd7rkic2h";
  };

in
stdenv.mkDerivation {
  pname = "requote";
  inherit version src;

  buildInputs = [];

  dontBuild = true;  # No compilation steps required, only unpacking.

  # Default unpack phase automatically extracts the source tarball
  # Default install phase is overridden below to place binaries correctly

  installPhase = ''
    mkdir -p $out/bin
    cp -r * $out/bin
  '';

  meta = with lib; {
    description = "tool for requoting double->single or single->double";
    homepage = "https://github.com/scottidler/requote";
    license = licenses.mit;
    platforms = platforms.linux;
  };
}

When I get to osConfig then I get ‘infinite recursion encountered’

I don’t know if this additional context helps.

Module imports should be paths. Replace this (and all the others like it) with

imports = [
  ./neovim
  ./firefox
  ./repos
];

and see if that helps.

I moved my three rust repos under a new folder called ‘packages’ and then used the callPackage machinery to invoke them. I think I am learning that there is a difference between a module and a package and I was running up against this difference.

drwxr-xr-x    - saidler 20 Apr 16:00 .
.rw-r--r-- 3.1k saidler  2 Apr 16:26 ├── .gitignore
.rw-r--r-- 6.8k saidler 20 Apr 09:24 ├── configuration.nix
drwxr-xr-x    - saidler  4 Apr 16:07 ├── HOME
.rw-r--r-- 4.1k saidler  2 Apr 16:26 │  ├── .bash_prompt
.rw-r--r-- 4.2k saidler  4 Apr 16:07 │  ├── .bashrc
drwxr-xr-x    - saidler  4 Apr 21:55 │  ├── .config
drwxr-xr-x    - saidler  4 Apr 15:07 │  │  ├── aka
.rw-r--r--  14k saidler  4 Apr 15:07 │  │  │  └── aka.yml
drwxr-xr-x    - saidler  2 Apr 16:26 │  │  ├── clone
.rw-r--r--  415 saidler  2 Apr 16:26 │  │  │  └── clone.cfg
drwxr-xr-x    - saidler  4 Apr 21:55 │  │  ├── nvim
.rw-r--r--  37k saidler  4 Apr 21:53 │  │  │  └── init.lua
drwxr-xr-x    - saidler  2 Apr 16:26 │  │  ├── pip
.rw-r--r--  159 saidler  2 Apr 16:26 │  │  │  └── pip.conf
drwxr-xr-x    - saidler  2 Apr 16:26 │  │  ├── rmrf
.rw-r--r--  168 saidler  2 Apr 16:26 │  │  │  └── rmrf.cfg
drwxr-xr-x    - saidler  2 Apr 16:26 │  │  └── tmp
.rw-r--r--  10k saidler  2 Apr 16:26 │  │     └── tmp.yml
.rw-r--r-- 2.7k saidler  2 Apr 16:26 │  ├── .expand-aka
.rw-r--r-- 2.2k saidler  2 Apr 16:26 │  ├── .gitconfig
.rwxr-xr-x  591 saidler  2 Apr 16:26 │  ├── .gitconfig-ssh
.rw-r--r--  194 saidler  2 Apr 16:26 │  ├── .gitconfig-work
drwxr-xr-x    - saidler  2 Apr 16:26 │  ├── .gnupg
.rw-r--r--   35 saidler  2 Apr 16:26 │  │  └── gpg.conf
drwxr-xr-x    - saidler  2 Apr 16:26 │  ├── .local
drwxr-xr-x    - saidler  2 Apr 16:26 │  │  └── share
drwxr-xr-x    - saidler  2 Apr 16:26 │  │     └── applications
.rw-r--r-- 9.6k saidler  2 Apr 16:26 │  │        ├── .obsidian.png
.rw-r--r--  514 saidler  2 Apr 16:26 │  │        └── Obsidian.desktop
.rw-r--r-- 7.6k saidler  2 Apr 16:26 │  ├── .rustfmt.toml
.rw-r--r-- 1.4k saidler  2 Apr 16:26 │  ├── .shell-aliases
.rw-r--r--  832 saidler  2 Apr 16:26 │  ├── .shell-exports
drwxr-xr-x    - saidler  2 Apr 16:26 │  ├── .shell-exports.d
.rw-r--r--  333 saidler  2 Apr 16:26 │  │  └── rust.env
.rw-r--r--  347 saidler  2 Apr 16:26 │  ├── .shell-functions
drwxr-xr-x    - saidler  2 Apr 16:26 │  ├── .ssh
.rw-r--r--  425 saidler  2 Apr 16:26 │  │  └── config
.rw-r--r--  485 saidler  2 Apr 16:26 │  ├── .ssh-ident
.rw-r--r--  928 saidler  2 Apr 16:26 │  ├── .tmux.conf
.rw-r--r--  15k saidler  2 Apr 16:26 │  ├── .vimrc
drwxr-xr-x    - saidler  2 Apr 16:26 │  ├── .zsh
drwxr-xr-x    - saidler  2 Apr 16:26 │  │  └── functions
.rw-r--r-- 1.2k saidler  2 Apr 16:26 │  │     └── _exercism
.rw-r--r--   25 saidler  2 Apr 16:26 │  └── .zsh-dircolors.config
.rw-r--r-- 8.8k saidler 20 Apr 16:00 ├── home.nix
.rw-r--r-- 1.1k saidler  2 Apr 16:26 ├── LICENSE
drwxr-xr-x    - saidler 15 Apr 15:42 ├── modules
.rw-r--r--  123 saidler 15 Apr 15:42 │  ├── default.nix
drwxr-xr-x    - saidler 12 Apr 22:52 │  ├── firefox
.rw-r--r-- 4.5k saidler 12 Apr 22:52 │  │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 19:25 │  ├── neovim
drwxr-xr-x    - saidler 14 Apr 19:24 │  │  ├── config
.rw-r--r--  787 saidler 14 Apr 19:24 │  │  │  ├── autocmds.lua
.rw-r--r-- 3.4k saidler 12 Apr 22:53 │  │  │  ├── mappings.lua
.rw-r--r-- 1.2k saidler 14 Apr 19:23 │  │  │  ├── options.lua
drwxr-xr-x    - saidler 14 Apr 08:42 │  │  │  └── setup
.rw-r--r--  136 saidler 12 Apr 22:53 │  │  │     ├── chatgpt.lua
.rw-r--r-- 2.3k saidler 12 Apr 22:53 │  │  │     ├── cmp.lua
.rw-r--r-- 3.2k saidler 14 Apr 08:42 │  │  │     ├── dap.lua
.rw-r--r--  226 saidler 12 Apr 22:53 │  │  │     ├── diagnostic.lua
.rw-r--r-- 2.6k saidler 12 Apr 22:53 │  │  │     ├── lspconfig.lua
.rw-r--r-- 8.3k saidler 14 Apr 08:41 │  │  │     ├── luasnip.lua
.rw-r--r-- 2.4k saidler 12 Apr 22:53 │  │  │     ├── neoai.lua
.rw-r--r--  355 saidler 12 Apr 22:53 │  │  │     ├── neorg.lua
.rw-r--r--  453 saidler 12 Apr 22:53 │  │  │     ├── telescope.lua
.rw-r--r-- 1.6k saidler 12 Apr 22:53 │  │  │     └── treesitter.lua
.rw-r--r-- 7.4k saidler 14 Apr 19:25 │  │  └── default.nix
drwxr-xr-x    - saidler 20 Apr 15:49 │  └── repos
.rw-r--r--  263 saidler 20 Apr 15:49 │     ├── default.nix
drwxr-xr-x    - saidler 20 Apr 15:58 │     └── scottidler
drwxr-xr-x    - saidler 14 Apr 22:55 │        ├── cert-tools
.rw-r--r--  819 saidler 14 Apr 22:55 │        │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 19:26 │        ├── dock
.rw-r--r--  355 saidler 14 Apr 19:26 │        │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 15:48 │        ├── git
.rw-r--r-- 1.3k saidler 14 Apr 15:48 │        │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 23:11 │        ├── helpful
.rw-r--r--  850 saidler 14 Apr 23:11 │        │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 18:01 │        ├── repo
.rw-r--r-- 1.1k saidler 14 Apr 18:01 │        │  └── default.nix
drwxr-xr-x    - saidler 14 Apr 16:03 │        └── tmp
.rw-r--r--  575 saidler 14 Apr 16:03 │           └── default.nix
drwxr-xr-x    - saidler 20 Apr 15:57 ├── packages
drwxr-xr-x    - saidler 20 Apr 15:57 │  └── repos
drwxr-xr-x    - saidler 20 Apr 15:58 │     └── scottidler
drwxr-xr-x    - saidler 15 Apr 07:40 │        ├── aka
.rw-r--r-- 1.1k saidler 15 Apr 08:32 │        │  └── default.nix
drwxr-xr-x    - saidler 20 Apr 16:54 │        ├── requote
.rw-r--r--  980 saidler 20 Apr 16:54 │        │  └── default.nix
drwxr-xr-x    - saidler 17 Apr 18:08 │        └── rmrf
.rw-r--r--  964 saidler 20 Apr 16:03 │           └── default.nix
.rw-r--r--   40 saidler  2 Apr 16:26 └── README.md

here is my home.nix calling these packages

# home.nix
{ config, pkgs, lib, ... }:
{
  # Home Manager needs a bit of information about you and the paths it should
  # manage.
  home.username = "saidler";
  home.homeDirectory = "/home/saidler";

  nixpkgs.config = {
    allowUnfree = true;
  };

  imports = [
    (import ./modules)
  ];

  # This value determines the Home Manager release that your configuration is
  # compatible with. This helps avoid breakage when a new Home Manager release
  # introduces backwards incompatible changes.
  #
  # You should not change this value, even if you update Home Manager. If you do
  # want to update the value, then make sure to first check the Home Manager
  # release notes.
  home.stateVersion = "23.11"; # Please read the comment before changing.

  # The home.packages option allows you to install Nix packages into your
  # environment.
  home.packages = with pkgs; [
    # other packages
    (callPackage ./packages/repos/scottidler/aka {})
    (callPackage ./packages/repos/scottidler/requote {})
    (callPackage ./packages/repos/scottidler/rmrf {})

I didn’t get the modularization I was hoping for but I am going to punt on further gnashing of teeth on this one…

NOTE: @rhendric it DOES work without the (import blah) syntax. Thanks for that. But it did not change the fact that this is a modules vs packages issue.