aleeusgr / nix-things

a toolbox
1 stars 0 forks source link

error: anonymous function at /nix/store/..eval-config.nix:11:1 called with unexpected argument 'packages' #13

Closed aleeusgr closed 1 year ago

aleeusgr commented 1 year ago

This https://github.com/aleeusgr/nix-things/blob/1476e0ae01dc2d0370c5bc06b4d5c16b9315a523/flake.nix#L54-L57

causes nixos-rebuild to give:

        error: anonymous function at /nix/store/n0f21zpy9w90sa9v75iwx6fmk897z3nw-source/nixos/lib/eval-config.nix:11:1 called with unexpected argument 'packages'

       at /nix/store/n0f21zpy9w90sa9v75iwx6fmk897z3nw-source/flake.nix:22:11:

           21|         nixosSystem = args:
           22|           import ./nixos/lib/eval-config.nix (
             |           ^
           23|             args // {

Originally posted by @aleeusgr in https://github.com/aleeusgr/nix-things/issues/10#issuecomment-1333334760

NobbZ commented 1 year ago

The nixosSystem function does not know about an argument packages, you probably ment to use a module which adds those to environment.systemPackages.

aleeusgr commented 1 year ago

now for me to understand.

https://nixos.wiki/wiki/NixOS_modules

NobbZ commented 1 year ago

You need to set environment.systemPackages in a module.

I am not sure what you want to import, nor what configuration.nix is, other than an arbitrary file name.

aleeusgr commented 1 year ago

OK, I needed this. Thank you, @NobbZ

TODO: test cardano-node using local clone of nixpkgs. 7.1.2. Adding Custom Packages

Alternative solution