ryan4yin / nixos-and-flakes-book

:hammer_and_wrench: :heart: Want to know NixOS & Flakes in detail? Looking for a beginner-friendly tutorial? Then you've come to the right place! 想要学习使用 NixOS 与 Flakes 吗?在寻找一份新手友好的教程?那你可来对地方了!
https://nixos-and-flakes.thiscute.world
Creative Commons Attribution Share Alike 4.0 International
2.07k stars 105 forks source link

Occured error when follow your instructions. #15

Closed ityspace closed 1 year ago

ityspace commented 1 year ago
let
  a = 1;
in
"the value of a is ${a}" 

THEN output that : error: cannot coerce an integer to a string

   at «string»:4:2:

        3| in
        4| "the value of a is ${a}"
         |                    ^
        5|
ityspace commented 1 year ago

So the interpolation cannot be an integer?

ryan4yin commented 1 year ago

Yep, I made a mistake here, I found an issue related to it: https://github.com/NixOS/nix/issues/7327

ryan4yin commented 1 year ago

Fixed, I changed it to a = "1";