Hi Nico,
On 2026-12-02 at 07:52+01:00, Nico Rikken wrote:
> (home-environment
> (packages
> (list
> ...
> rust
> rust:cargo))))
>
> If I try with only 'rust', it succesfully configures. If I try with
> 'rust:cargo' with or without 'rust', it fails:
>
> $ guix home reconfigure ~/guix-home-config.scm
> /home/user/guix-home-config.scm:109:8: error: rust:cargo: unbound
> variable
> hint: Did you forget a `use-modules' form?
>
> So how do I add it to the home config in a way that it works?
>
> I tried quoting the variable in different ways, assuming the colon was
> causing an issue, but that didn't work.
In Guix a package can be referred to in two ways, as a Guile variable
as defined in the respective module, or a package specification
usually seen in the CLI. rust:cargo is the latter and you'd want
to use look it up as follows
(home-environment
(packages (specifications->packages '("rust" "rust:cargo"))))
See also:
https://guix.gnu.org/manual/devel/en/html_node/Using-the-Configuration-System.html#Globally_002dVisible-Packages
Cheers,
Phong