Guix protip!

Sometimes you have packages that you don't use very often. You don't need them upgraded and installed every time you upgrade your system or user packages.

You can do:

guix environment --ad-hoc package -- program-to-launch

For example, I just did:

guix environment --ad-hoc krita -- krita

If you start to use a program more often, then you can decide to add it to your user/system profile!

· · Web · 5 · 6 · 12

That's currently the case with me and Krita... and maybe it'll become something I feel justified in having always around (I'd like that, actually... need more time to get comfortable in it)

Show thread

@cwebber would you say this more similar to nix-shell -p package or nix-env -i package? I’m not very familiar with the guix ecosystem.

Either way, fantastic tip!

@afontaine I'm guessing the latter but I don't really know, I'm not much of a Nix user :)

@cwebber Ah fair enough!

nix-shell -p opens a new shell with the given package in your path: temporary, and the package is no longer included in your path after the shell is exited.

nix-env -i installs the package to your environment, which persists across shells/logouts/reboots/etc. I don’t think it is upgraded when you upgrade the whole system though I might be wrong there.

@cwebber Is there an easy way of getting a list of your ad-hoc packages?

(krita's awesome though by the way)

@emacsomancer --ad-hoc packages are open only for the time when you use them (or when you close the subshell). Ephemeral!

There is no such thing like "ad-hoc" packages. Every package can be installed that way. The '--ad-hoc' parameter just tells 'guix environment' to install the actual package (instead of its dependencies)

@cwebber Hey, Chris 🙂 Speaking of Krita and the GNU OS from Guix, do you use a drawing tablet? I'd like to get one but I don't know what brand would work well in the Guix System...

@luis_felipe I've been using a Wacom Intuos 2 since 2003. I will probably upgrade this year finally though. It's managed to work for me for almost two decades!

@cwebber the thinkpad tablets (e.g. X220T) with built-in wacom interfaces are pretty nice too, though the screens are of course on the small side

@cwebber I got my wife a X220T a few years back (she's using Krita on it as we speak!) and it's worked pretty well - though I'd like to get her something with a bigger screen at some point.

I got myself a X200T for like $15 a few months ago and have really been enjoying using it. (I'm old enough that there's still something very futuristic to me being being able to 'paint' directly on a screen.)


@cwebber In NixOs you can do the same thing with:
nix-shell -p krita --run krita

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!