Error when enabling bolt service on unstable

Hello,
today following this discussion I stumbled upon an error while building my configuration:

# nixos-rebuild switch
building Nix...
building the system configuration...
error: value is a boolean while a set was expected, at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:300:62
(use '--show-trace' to show detailed location information)

# nixos-rebuild switch --show-trace
building Nix...
building the system configuration...
error: while evaluating the attribute 'activationScript' of the derivation 'nixos-system-ender-20.03pre210639.e59dcf8ccec' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:102:5:
while evaluating the attribute 'system.activationScripts.script' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:68:9:
while evaluating 'textClosureMap' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings-with-deps.nix:70:35, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:89:18:
while evaluating 'id' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:14:5, called from undefined position:
while evaluating the attribute 'text' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:9:5:
while evaluating the attribute 'text' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings-with-deps.nix:77:38:
while evaluating the attribute 'sources' of the derivation 'etc' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:12:5:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:20:20, called from undefined position:
while evaluating the attribute 'source' at undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:84:45, called from undefined position:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:379:9:
while evaluating the option `environment.etc.dbus-1.source':
while evaluating the attribute 'mergedValue' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:411:5:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:413:22, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:413:9:
while evaluating 'check' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:251:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:414:14:
while evaluating the attribute 'serviceDirectories' of the derivation 'dbus-1' at /nix/store/yi2fbywlqb511l6sb2ca93l3hpi851zi-nixos-20.03pre210639.e59dcf8ccec/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:263:14, called from undefined position:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:425:27:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:413:22, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:413:9:
while evaluating 'check' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:251:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:414:14:
while evaluating the attribute 'passAsFile' of the derivation 'system-path' at /nix/store/yi2fbywlqb511l6sb2ca93l3hpi851zi-nixos-20.03pre210639.e59dcf8ccec/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'environment.systemPackages' at undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:84:45, called from undefined position:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:379:9:
while evaluating the option `environment.systemPackages':
while evaluating the attribute 'mergedValue' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:411:5:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:405:9:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:505:7:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:391:28, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:391:17:
while evaluating 'dischargeProperties' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:464:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:392:62:
while evaluating the attribute 'condition' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:549:14:
while evaluating the attribute 'condition' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:549:14:
while evaluating the attribute 'condition' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:549:14:
while evaluating the attribute 'services.hardware.bolt.enable' at undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:84:45, called from undefined position:
while evaluating 'yieldConfig' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:83:29, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:86:16:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:89:24, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:89:11:
while evaluating the attribute 'names' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:300:54:
value is a boolean while a set was expected, at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:300:62

The config module for the bolt service seems quite simple but I’m not able to understand if it may be a problem of my configuration or of nixpkgs, any idea how to debug it further?

Setting services.hardware.bolt.enable = true; evaluates fine for me.

Seems like you somehow put it in environment.systemPackages or something? Can you paste your configuration.nix somewhere?

@ajs124 thanks for answering, see here https://gitlab.com/azazel/ender-config/tree/bolt-issue

That’s not services.hardware.bolt.enable = true, that’s services.hardware.bolt = true.

You’re right! sorry to have bothered you with it!

No problem, glad I could help. That error message could definitely have been more helpful.

It’s factually true, you passed a boolean where a set was expected, but it doesn’t really tell you anything.