Hello,

"Reza Alizadeh Majd" <[email protected]> skribis:

> Just wanted to now if there is any programming interface available for Guix 
> in order to
> install a packages with a Guile script ? 
>
> I actually want to install packages for a specific user, after `guix system 
> reconfigure ... ` 
> command. my plan was to add a simple Guile script after `operating-system` 
> definition 
> in my system configuration file, to add packages to user's profile.
>
> the easiest way is to just run a shell script for to do that for me, but I'm 
> curious that if there 
> is any more programmatic solution for that?

Every ‘guix’ command has at least a corresponding procedure.  So ‘guix
package’ matches precisely the ‘guix-package’ procedure of (guix scripts
package).

When this is too CLI-ish, you can use more Schemey APIs.  For instance,
‘guix package’ relies on things in (guix scripts) and (guix profiles).

As for your specific use case, I would argue that you could implement it
as a service.  The service would take a list of user/manifest pairs as
its configuration and simply have an activation snippet that installs
the user profiles.  That would be a useful feature to have.

HTH!

Ludo’.

Reply via email to