💾 Archived View for rwv.io › 2021-11-25-nix-on-guix.gmi captured on 2021-12-03 at 14:04:38. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
After 5 months of running Guix as my primary GNU/Linux desktop distribution I'm still pretty happy. I went for a Guix System because I have a couple of workstations and I like to keep them as similar as possible, too much muscle memory.
Although the Guix package repository is very large, sometimes I do miss some stuff which I find hard to package myself. I don't like just building stuff and putting it in /opt or whatever, it's messy and annoying to keep up to date. Package maintainers are much better at that sort of thing than I am. They are the true heroes of the OSS world and get far too little credit for the great work they are doing.
The great thing about installing Guix on a distribution like Debian is that you get the best of both worlds: a sane way to deal with multiple versions of software and a huge trove of Debian packages but without the sanity. Unfortunately you can't have it the other way around, install Debian package on a Guix system, and being spoiled by Guix's package manager I don't want to because traditional package managers make me feel dirty now.
This awesome ability to use Guix on top of another distribution is also available in Nix which has a bigger selection of packages and it also knows how to deal with multiple version (Guix is based on Nix). Win!
Here's my notes on how I got this to work on my systems.
Insert the Nix service in your system:
(service nix-service-type)
This service will handle dealing with channels, installations and profiles. To get access to the Nix tools (nix-env, nix-channel), we need to install the "nix" package:
guix package -i nix
Now the infrastructure is in place.
Both Nix and Guix announce their packages through channels. To be able to install packages your system needs to known what channels it needs to listen to. Let's install the current NixOS:
nix-channel --add https://nixos.org/channels/nixos-21.05 nixos
Now we need to pull in the package information from that channel:
nix-channel --update
Let's see if it works:
nix-env -i hello
run it:
~/.nix-profile/bin/hello
Updating and upgrading our Nix packages will be something like:
nix-channel --update nix-env -u
Put the commands of installed packages on our PATH:
export PATH="$HOME/.nix-profile/bin:$PATH"
and make sure GUI applications known how to find fonts:
export FONTCONFIG_PATH="$(guix build fontconfig)/etc/fonts"
That's it! Well.. that's enough for the applications I am using. Did I miss something? Let me known.
Cheers,
R.
--
📅 2021-11-25
🏷 guix, nix
📧 hello@rwv.io
🅭 BY-NC-SA 4.0