import in home-manager gives a "cannot coerce a set to a string, in shell.nix"
Closed this issue · 8 comments
I have this message when trying to use shadow-nix import in home-manager
imports = [
(fetchGit { url = "https://github.com/NicolasGuilloux/shadow-nix"; ref = "v1.0.0"; } + "/import/system.nix")
];
-> % home-manager switch --show-trace | grep shadow
trace: Warning: `stdenv.lib` is deprecated and will be removed in the next release. Please use `lib` instead. For more information see https://github.com/NixOS/nixpkgs/issues/108938
error: while evaluating the attribute 'buildCommand' of the derivation 'home-manager-generation' at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/pkgs/build-support/trivial-builders.nix:76:7:
while evaluating the attribute 'text' of the derivation 'activation-script' at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/pkgs/build-support/trivial-builders.nix:76:7:
while evaluating 'mkCmd' at /home/nico/.nix-defexpr/channels/home-manager/modules/home-environment.nix:502:17, called from undefined position:
while evaluating the attribute 'data' at /home/nico/.nix-defexpr/channels/home-manager/modules/lib/dag.nix:91:37:
while evaluating the attribute 'data' at /home/nico/.nix-defexpr/channels/home-manager/modules/lib/dag.nix:85:9:
while evaluating the attribute 'data' at undefined position:
while evaluating 'g' at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/attrsets.nix:294:19, called from undefined position:
while evaluating anonymous function at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/modules.nix:139:72, called from /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/attrsets.nix:297:20:
while evaluating the attribute 'value' at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/modules.nix:523:9:
while evaluating the option `home.activation.installPackages.data':
while evaluating the attribute 'mergedValue' at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/modules.nix:555:5:
while evaluating the attribute 'values' at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/modules.nix:549:9:
while evaluating the attribute 'values' at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/modules.nix:648:7:
while evaluating anonymous function at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/modules.nix:535:28, called from /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/modules.nix:535:17:
while evaluating definitions from `/home/nico/.nix-defexpr/channels/home-manager/modules/home-environment.nix':
while evaluating 'dischargeProperties' at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/modules.nix:607:25, called from /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/modules.nix:536:137:
while evaluating the attribute 'value' at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/modules.nix:390:44:
while evaluating the attribute 'passAsFile' of the derivation 'home-manager-path' at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/pkgs/build-support/trivial-builders.nix:76:7:
while evaluating the attribute 'passAsFile' at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/pkgs/build-support/buildenv/default.nix:77:5:
while evaluating the attribute 'text' of the derivation 'hm-session-vars.sh' at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/pkgs/build-support/trivial-builders.nix:76:7:
while evaluating 'exportAll' at /home/nico/.nix-defexpr/channels/home-manager/modules/lib/shell.nix:10:15, called from /home/nico/.nix-defexpr/channels/home-manager/modules/home-environment.nix:459:15:
while evaluating anonymous function at /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/attrsets.nix:252:10, called from undefined position:
while evaluating 'export' at /home/nico/.nix-defexpr/channels/home-manager/modules/lib/shell.nix:5:15, called from /nix/store/1bc6gl7ywgx4lx8grw96jxscb0j286v2-nixpkgs-21.05pre281594.6fc2b7ecc2a/nixpkgs/lib/attrsets.nix:252:16:
cannot coerce a set to a string, at /home/nico/.nix-defexpr/channels/home-manager/modules/lib/shell.nix:5:35
There are 61 unread and relevant news items.
Read them by running the command 'home-manager news'.
There's no reference to shadow-nix package... but without the import i have no issue...
really don't know where to look at.
Tell me if you need me to tests things. I might be able to try things... even if I am not very very experienced with nix still...
Hi!
I can see that you use the unstable channels (21.05). I guess this is the problem. I'll try to make a VM that uses this channel to test if it works.
I'm not really sure that it is related to the shadow package since it fails using the shell library. Maybe it related to one of the package's dependency. I'll check that asap ;)
oh yeah ! I live on the 'bleeding edge' !
Probably my problem
Updated my local checkout today and ran into this issue. I have not dug deeply into the issue yet, but the this commit does not have the problem and works completely fine: 9c30c2d
The commit after this is Version 1.0.0
Which completely rewrites nearly everything as well as introducing this bug.
Okay I'll investigate this week-end :)
Finally after reading the issue again, I noticed that you try to import the system.nix
file in your home-manager. Do you think this may be the issue?
I tried to make this issue appear on Github Action but I don't know how to install a home manager action that imports the file. If you have an idea, it would be great.
I'm currently installing a VM that uses home-manager
FYI I added in the master branch the Github Action to test the Home Manager import so I hope this will cover any new case.
I don't know home to import the system config for now, but I'll try some day
Thanks a lot it's working like a charm !!!
You rock !
Merci :D