Trying out Guix for the first time! Waiting for packages to download.
I’m a long time Arch user. Any tips?!
I’ve heard there aren’t as many packages for Guix as other distros, but I was thinking Flatpak and distrobox will help bridge the gap for me.
I want to love Guix (both the package manager and the distro). I want to love Scheme. But I can never find any good tutorials for Scheme and using it with Guix. The GNU documentation is more of a reference than a tutorial. I use Emacs on the daily, and I just can’t get into Scheme.
I use Emacs on the daily, and I just can’t get into Scheme.
Do you find that Elisp and Scheme are too different? I don’t know either, so they look almost the same to me.
paequ2@lemmy.today I mean… I don’t really fully understand Elisp either, despite my Emacs config being 10 years old! 😅
Btw, here’s how you install distrobox on Guix.
First, install rootless Podman: https://guix.gnu.org/manual/devel/en/html_node/Miscellaneous-Services.html#Rootless-Podman-Service.
You need to edit your
/etc/config.scmor where ever you store your system config. Import the right modules/services, add your user tocgroup, addiptables-service-typeto yourservices, addrootless-podman-service-typeand configure it.(use-service-modules containers networking …) (use-modules (gnu system accounts)) ;for 'subid-range' (operating-system ;; … (users (cons (user-account (name "alice") (comment "Bob's sister") (group "users") ;; Adding the account to the "cgroup" group ;; makes it possible to run podman commands. (supplementary-groups '("cgroup" "wheel" "audio" "video"))) %base-user-accounts)) (services (append (list (service iptables-service-type) (service rootless-podman-service-type (rootless-podman-configuration (subgids (list (subid-range (name "alice")))) (subuids (list (subid-range (name "alice"))))))) %base-services)))Then of course you run
guix system reconfigure /etc/config.scm.Now you can do a simple
guix install distrobox. If you installdistroboxfirst, you don’t end up using rootless podman and you run into more problems that way. (You have to usedistrobox --root.)After that command, everything should work like normal. Enjoy. 🍻
distrobox create --image docker.io/library/archlinux:latest --name arch-dev distrobox enter arch-devI’ve not used Guix but I don’t think any distro has anything close to number of desirable available packages as arch— so be prepared for that. My ventures into debian, suse and fedora were made quite annoying by having to work around the many missing packages. Including user-facing applications, dependencies and background programs. I never quite got down with distrobox, maybe that’s the cure.
this chart on wikipedia gives the impression that Debian has more packages but that’s not the way it feels when you are looking for something. Maybe they have a lot of dot matrix printer libraries from 1992 or something which bring the number up.
Arch includes a lot of not-at-all-free packages (which it is impossible to distinguish in pacman or other tool as far as I can find), orphaned, new packages that haven’t yet made it into other repos, and packages where no attempt has been made to submit them to other repos.
On arch I have virtually never had to go outside the repos for packages. It’s very hard to give up once you are used to it. (Even though it’s better to use properly libre/free stuff and other benefits of a more curated approach like security, stability and quality.)
I love it especially because of the guix shell and guix shell container for dev environment isolation. It is a whole different ecosystem from the ground up though so it’s not an easy ride. But those two features make it worth it for me. Also it’s GNU distro which imo is a plus.
guix shell and guix shell container for dev environment isolation
Yeah! This is one of the features I’m most interested in. I haven’t gotten to using this feature yet, but I was curious about it.
Let’s say I’m working on a project that requires Go, Node, maybe some C library, and GNU Make. Seems like I would be able to use
guix shellfor this, right? Great.Now if a friend wanted to work on the project, could I share my
guix shellconfiguration with him? (Assuming he’s also a Guix user.)I’m currently using
distrobox.iniplusdistrobox assemblefor this kind of workflow, but of course this isn’t totally reproducible.yes, you would share with him guix manifest which is a file that specifies which packages should be present. What is important to note are inferiors which is a mechanism to version lock the packages.
share with him guix manifest
Aaaah: https://guix.gnu.org/manual/devel/en/html_node/Writing-Manifests.html
# Write a manifest for the packages specified on the command line. guix shell --export-manifest gcc-toolchain make git > manifest.scmHeck yeah!
thats it :) Now you need to pin package versions to guix versions via inferior so that you can share the manifest and be sure you have exact same stuff on the other machine. Otherwise the specified packages get updated everytime you update your system. I learned that the hard way by having to wait for latex to download everytime I updated my system.
I use nix for any packages I can’t get from guix repos. So that’s an option too.
Could you share how you do that? It didn’t work last time I tried it (using Nix on top of Guix).
to install nix succesfully on my laptop I had to do the following steps:
guix install nix
nix-channel --list
if nixpkgs is not in channel then add
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
sudo nix-channel --update --verbose
now change the group and ower of /nix
cd /nix/
sudo chown -R {your user name} ./var
sudo chown -R {your user name} ./store
sudo chgrp -R users ./var
sudo chgrp -R users ./store
now update the channels
nix-channel --update --verbose
################################
then install say firefox
nix-env -iA nixpkgs.firefox
Thanks! I think I need to set up the service first in my config.scm, right?
I jpst googled it and got these steps (haven’t tried them yet):
To set up a Nix service in your Guix configuration, you need to enable the service in your configuration file, typically located at
/etc/config.scm. You can refer to the Guix documentation for detailed instructions on how to properly configure and manage services.Step one: Open config file
Step 2: Enable nix service
(use-modules (gnu)) (operating-system ... (services (cons* (service (nix-service) (nix-configuration (nix-channel "https://nixos.org/channels/nixos-23.11")) ) ...)))Save the file and reconfigure:
sudo guix system reconfigure /etc/config.scmAfter reconfiguration, verify that the Nix service is running correctly by checking the service status:
systemctl status nix-daemonAdditional Notes:
-
Ensure you are using the latest stable version of Guix to avoid compatibility issues.
-
If you encounter any problems, consult the Guix documentation for troubleshooting tips.
-
The Nix service allows you to use Nix packages alongside Guix, providing flexibility in package management.
Hope this helps!
-
No I didn’t do anything in my config. You can though and it seems like a better less kludgy way to do it, I haven’t done that yet. If I ever figure it out I’ll let you know.
Let me check my notes ths weekend and get back to you.
Expect a steep learning curve even if you know Linux inside out. Don’t assume things work the way they did on Arch (or most other distros). If your hardware doesn’t work well, or you otherwise need some proprietary stuff, check out https://gitlab.com/nonguix/nonguix. Good luck!
Yep. Totally using
nonguix. I’m trying out Guix for the reproducibility and system management, not (just) for the FOSS software.From my initial research, I thought that Guix was only going to allow 100% FOSS software. But I’ve learned that’s not the case. It’s actually pretty easy to add additional channels in order to install non-FOSS software. The third-party channels integrate nicely!
I added
nonguixand also a channel for Tailscale!(list (channel (name 'nonguix) (url "https://gitlab.com/nonguix/nonguix") (branch "master") (introduction (make-channel-introduction "897c1a470da759236cc11798f4e0a5f7d4d59fbc" (openpgp-fingerprint "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) (channel (name 'tailscale) (url "https://github.com/umanwizard/guix-tailscale") (branch "main") (introduction (make-channel-introduction "c72e15e84c4a9d199303aa40a81a95939db0cfee" (openpgp-fingerprint "9E53FC33B8328C745E7B31F70226C10D7877B741")))) (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (branch "master") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))



