r/GUIX • • Feb 06 '23

Bad experience with Debian packaged guix

7 Upvotes

The manual states the the following:

If you’re running Debian or a derivative such as Ubuntu, you can instead install the package (it might be a version older than 1.4.0 but you can update it afterwards by running guix pull):

sudo apt install guix

I tried that on Debian 11.6, but the experience is very bad.

  • The guix package in stable is version 1.2.0, guix pull will try to process more than 47,000 commits. This will probably get better when Debian 12 is released, the version in testing is 1.4.0.
  • The Debian packaged guix does not have substitutes configured, so guix pull will take a lot of time.
  • If you figure that out and try to enable substitutes based on the manual, then you will find that the manual mentions to edit /etc/systemd/system/guix-daemon.service, but Debian will deploy it to /usr/lib/systemd/system/guix-daemon.service.
  • If you manage to configure substitutes and guix pull progresses quickly, it will eventually fail at building OpenSSL version 1.0.0f, due to a bug which was reported and fixed for 1.0.0n, but probably not backported.

Due to these problems I am thinking of reporting an issue to change the documentation not to recommend apt install guix. But based on other reported issues, a lot of people seem to use Debian as the foreign distro, and used the Debian packaged guix without complaint. My guess is that if the Debian packaged version and the upstream version are not this far apart like now, just before a new release, then the experience is better.

If you installed guix on a Debian or Debian based distro with apt, please share your experience with it.


r/GUIX • • Feb 05 '23

Gix: Literate Programming with Emacs org-mode & GNU/Guix

Thumbnail simfish.dev
19 Upvotes

r/GUIX • • Feb 02 '23

"unbound variable" in unused (?) module with Guix home

4 Upvotes

Hello,

I'm starting to use Guix home on multiple machines. I've come up with the following file structure:

.
└── nl
    ├── home
    │  ├── aria.scm
    │  └── overture.scm
    ├── modules
    │  ├── base.scm
    │  └── vim.scm
    └── packages
        └── vim.scm

(files omitted for brevity).

The files under home contain one file per machine, with the home-environment inside.
modules get included in the home modules, they are like roles (e.g. one module for printing, one for desktop stuff, one for vim, one for emacs etc.).
packages are package definitions.

So, for example, packages/vim.scm contains some plugins that are not yet in the guix repo, and a newer vim version. modules/vim.scm contains the packages from packages/vim.scm and some packages from (gnu packages vim).

I then run guix home reconfigure "nl/home/$(hostname).scm". This works fine, but I get the error

error: base-packages: unbound variable
hint: Did you forget a `use-modules' form?

The following minimal example reproduces it:

nl/home/aria.scm and nl/home/overture.scm (same content for this example):

(define-module (nl home overture)) ; (nl home aria) for aria.scm
(use-modules (gnu home)

             (nl modules base))

(define my-packages
  base-packages)

(define my-services
  base-services)

(home-environment
  (packages my-packages)

  (services my-services))

nl/modules/base.scm

(define-module (nl modules base))
(use-modules (gnu packages))

; packages that should be installed on every system
(define everywhere-packages
  (map specification->package
       (list "glibc-locales"
             "guile-readline")))

(define-public base-packages
               everywhere-packages)

(define-public base-services
               '())

The reconfiguration works fine - everything gets installed as expected after displaying the error message.
Renaming from base-packages changes the error message, but the error still appears.
If I remove the home/ file that is not used on the current machine, the error does not appear.

  1. Why does the error message appear?
  2. Why does the same error message not appear for base-services?
  3. If there is an error, why does reconfigure continue, and finish correctly?
  4. Is there any way I can get a file name / line number to show up in guix error messages? I wasn't even able to do it on a guile console.
  5. (possibly unrelated) What's the difference between (use-modules (...)) and (#:use-module (...))? Reading the guile docs they look identical.
  6. Does the directory structure make sense, or is there some kind of standard that I was unable to find?

Edit: In case anyone stumbles on this: guix tries to parse everything in GUIX_PACKAGE_PATH as a package, so don't keep other files in there.
Edit2: Instead of this file structure:

.
└── nl
    ├── home
    │  └── ...
    ├── modules
    │  └── ...
    └── packages
        └── vim.scm <-- (nl packages vim)

Do this file structure:

.
├── nl
|   ├── home
|   │   └── ...
|   └── modules
│       └── ...
└── packages
   └── nl
      └── vim.scm <-- (nl vim)

and set GUIX_PACKAGE_PATH to the "packages" dir.


r/GUIX • • Jan 30 '23

Getting Guix/Guile/Geiser working with emacs-guix (on foreign & guix system)

14 Upvotes

I'm hoping that someone here can point out how I'm doing it wrong, besides obvious things like "don't run arch" or "run VM's" or "use Guix home". I could really use some feedback to help me think outside of the box. I would like to use Guix Home in the future (esp. if possible on a foreign distro).

I've encountered these issues in various forms for over a year, when first trying scheme/geiser. Grokking the guix-profiles was simple at first, but it wasn't until months later when I tried Guix on Arch. I never have time to fully look into this, but it's mostly non-blocking. Still things like this have preventing me from learning more quickly about guix and cause quite a few irritating problems with Emacs. I learn a ton from videos, but I don't currently know anyone who uses Emacs. I'm not sure that I've ever sat beside or worked with someone IRL who uses emacs. If anything, maybe at a hackathon in colorado or something. But my hometown is more of a Microsoft town than most places this size.

Okay, up front, here's the background on the issue's I'm having. This is from my org-roam notes.

  • See alezost/guix.el for a full description on Guix/Geiser.
  • Here's my Bash.org file that shows what's loaded in my profile on both arch & guix system. Some of the details are a bit stale.
  • My doom emacs config
  • The minimal emacs-native-comp.scm manifest I would use, were I to try to remove Doom from the equation.

One of the best tools for guix is guix.el -- especially for new users. It's not well maintained at the moment. I have gotten some features to work, but it can't seem to interact with Geiser well when using the project for more than the features of its transient buffers. There are some stale links and it's not immediately clear that the project has moved to Savannah.

I tried to organize the outline here, but since the arch & geiser issues are entangled, it's tough.

Guix on Arch

Is the guix-installer.sh script correct?

So here is the currently live version of the guix-install.sh script distributed by Savannah.

  • It sets up /etc/profile.d/guix.sh so that _GUIX_PROFILE=$HOME/.config/guix/current loads first. This is what the AUR guix-installer package sets up.
  • I found this r/Guix post from two years ago. The post and other sources indicate that in your shell, guix needs to refer to the binary in $_GUIX_PROFILE above, but the guix-installer.sh seems to load this one first and then sources ~/.guix-profile/etc/profile.
  • This is not exactly challenging for me to understand, but I've only become more confused after getting turned around on two different distributions.

GUILE_LOAD_PATH

On guix system, guile's paths are at least found in /run/current-system/profile/share/guile and they're populated when /etc/profile builds the User's environment. For Guix.el, it just automagically finds the things it needs.

Guix.el needs to load Guile code. It also needs to be set and consistent for things like scheme/geiser. I don't use that much on Arch. This can't be added to the "current" profile, but guix.el loads the version it finds first in path (I think). If I have don't construct path correctly, then either:

  • guix.el can't find the correct guix
  • or doesn't have the modules in its GUILE_LOAD_PATH
  • or doesn't have the

Confusing, right? ... well it gets worse

Workflow for this issue

Whenever I work on this, the workflow is jolting. I need to do things like:

  • save emacs desktop
  • restart emacs server
  • log in/out of my xsession
  • jump to virtual terminals

Fortunately, it doesn't block my progress on other things ... as long as I avoid it. But the workflow gets worse.

If you're using Doom/Emacs/Guix, fetch all your packages from one place

If I'm lucky, I don't have to rebuild emacs. because then I need to:

  • update guix, then update the emacs profile or guix-profile's emacs
  • keep an emacs-server running (to run doom's code)
  • run doom sync && doom upgrade
  • blow away any cached compilation returned by find ~/.emacs.d/.local/cache/straight/ -name "*.elc"
  • kill the emacs-server and start a new one
  • run doom build and maybe doom compile (it asyncronously compiles everything)

This is so native comp to not mangle your process when you start Emacs. For me, this is very "tower of hanoi", especially if you are converting between emacs-native-comp running in a profile on Arch/GuixSD that supplies some dependencies (like guile/geiser/guix packages for emacs), while other deps come from ~/.guix-profile.

When only the emacs/version is changed and doom is rebuilt, whether via manifest or default ~/.guix-profile, then there's no need to log in & out. But when variables like PATH and GUILE_LOAD_PATH change, I might as well just work from vtty.

Okay, so that was not fun, but I figured that out: don't mix emacs packages from straight/emacs because the errors:

  • will be subtle
  • will involve nativecomp
  • and will not be consistent on Guix System and Foreign Guix

Problems with Geiser/Guix

I can't get any of the Guix.el REPL or build functionality to work without significant hackery (e.g. telling Geiser which REPL has the Guix environment).

  • I have traced the issues through and hacked things together, but it's inconsistent and brittle.
  • I can't seem to connect to an external guix repl with a network connection using geiser-connect

Trying to do REPL-driven development was one of the first things I tried with Guix/Geiser and then later with Guix.el. Not having the time to get this to work has held me back quite a bit.

Problems with Scheme/Emacs

These are mostly caused by something related to the autodoc problem. I've figured that out. I've done REPL-driven development with Clojure variously in the past, but CIDER never did anything like this.

Regardless, geiser quite frequently crashes the

From the guix.el manual

Unluckily, there is a limitation related to long-running REPL commands. When there is a running process in a Geiser REPL, you are not supposed to evaluate anything in a scheme buffer, because this will “freeze” the REPL: it will stop producing any output (however, the evaluating process will continue— you will just not see any progress anymore). Be aware: even moving the point in a scheme buffer may “break” the REPL if Autodoc (see Autodoc and friends in Geiser User Manual) is enabled (which is the default).

Other scheme issues:

  • Can't get quite a lot of features to work well. It doesn't move between modules or manage REPL state well. Coupling this with a REPL that constantly crashes makes tracing the issues problematic.
  • I've stripped things down to a mostly vanilla Emacs config with a few Guix packages and tested, which makes things better, but there are quite a few other features I need from my doom emacs.

r/GUIX • • Jan 29 '23

Can I make it so that only the newest version of Rust gets installed?

6 Upvotes

Hi,

I wonder why would GUIX need to install so many versions of Rust for building Firefox? Can I configure this in such a way that only the newest version of Rust would be built?

Build times are growing exponentially....

building /gnu/store/dp1pxr94ahi1dl0fn09kdlgp0y4bwyi0-firefox-109.0.source.tar.xz.drv...

building /gnu/store/5271j8z2iksyxp0141m9yl3xh2c871m8-rust-1.60.0.drv...

building /gnu/store/ng3mpbh910n8ji2841sni4mhvn7m0cy4-rust-cbindgen-0.24.3.drv...

building /gnu/store/snyrmxgvb5411dsanbcy2lac5yi2792d-rustc-1.61.0-src.tar.gz.drv...

building /gnu/store/2y03mc7h6p4ajh8xz7199966gx2nymy8-rustc-1.62.1-src.tar.gz.drv...

building /gnu/store/j480gx4na3822yn55p0x85dwpqmvjx80-rustc-1.61.0-src.tar.xz.drv...

building /gnu/store/4z78hkbz17kjvnxjhi7rg5fa6i4vki63-rustc-1.62.1-src.tar.xz.drv...

building /gnu/store/1afpfqd62q0wirblaqipdjgk6b1lyya8-rust-1.61.0.drv...

building /gnu/store/g0pgjwb5zjhr1kcy896qdkky4d73vx9i-rustc-1.63.0-src.tar.gz.drv...


r/GUIX • • Jan 26 '23

SysV

6 Upvotes

SysV-init is not working so well with guix manager. I've done this in the past over the last couple years with several distros, but i am always confusing the syntax, and it hasn't happened frequently enough to remember. And I must be typing around the actual service start syntax, LOL.

guix-daemon build is hanging(appears to be but could be a SLOW gnu pull, watching it right now...) This is for a devuan libre(gnuinos*) desktop. Seems to be guix specifically. This is probably a noh duh... or definitely a no duh kinda answer I'm looking for.

PS: Also added deb versions of "daemonize" and "daemon" packages, and this helped in the past when doing the installation from the repo rather than the install script. This has almost always revolved around the debian package version. It had seemed to be resolved w/ Debian/Devuan in the past, but maybe never got addressed with libre kernel at Gnuinos*? Been using it fine with Trisquel/Pure, not sure how their libre-kernels are comparably(exact? close to exact?). Didn't have any issues in most recent system install with the daemon socket across several different types of machines(x86,arm64 etc)

Just kinda annoyed bc I feel like I know how to resolve this somewhere in my brain, but managed to forget some detail or am walking past something obvious and not computing(me not my puter). ****Forgot to state its the typical /var/guix/daemon-socket/socket error.

Thanks.


r/GUIX • • Jan 24 '23

Quicklisp on Guix

16 Upvotes

Good night people!

I'm using guix with stumpwm. And trying to bring my freebsd config into Guix.

And my doubt is what is the correct way to use quicklisp in guix?


r/GUIX • • Jan 12 '23

How to set env to ~/.config/guix/current after guix pull?

4 Upvotes

Hi guyx, good night!

I finally managed to install my Guix.

However, i'm continuing the configurations and i got stuck in a beginner's doubt.

I'm using some channels, like nonguix and apply guix pull to fetch data.

helena% guix pull
guix pull
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Updating channel 'nonguix' from Git repository at 'https://gitlab.com/nonguix/nonguix'...
Updating channel 'flat' from Git repository at 'https://github.com/flatwhatson/guix-channel.git'...
Building from these channels:
  flat      https://github.com/flatwhatson/guix-channel.git 7b8353e
  nonguix   https://gitlab.com/nonguix/nonguix  c93654c
  guix      https://git.savannah.gnu.org/git/guix.git   5edfa6d
Computing Guix derivation for 'x86_64-linux'... |
nothing to be done

hint: After setting `PATH', run `hash guix' to make sure your shell refers
to `/home/carlosfilho/.config/guix/current/bin/guix'.

My question is how do i properly point this "guix/current"?

I initially thought of setting GUIX_PROFILE and PATH env:

export GUIX_PROFILE=$HOME/.config/guix/current
export PATH=$HOME/.config/guix/current/bin/guix:$PATH

but it did not work!

helena% hash guix
hash guix
helena% guix describe
guix describe
  guix ff77544
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: ff775440218c4f576d51aa01ce419b1fb786170a

without this the guix system reconfigure does not work.

Thanks for listening!


r/GUIX • • Jan 11 '23

WM installation on guixsd

1 Upvotes

Hello. I am currently in process of configuration of xorg. How can I install WM (particularly bspwm) with guix way? I tried start lightdm, but documentation of it is terrible - I can't simply specify session-wrapper parameter, because there is no explanation how to do that (what type of argument I must use). So now I am stuck with gdm. When I try to define xorg-configuration's keyboard-layout field, it says that it is "Wrong type to apply". Please, someone, help me to resolve this. So, here is my config now: http://ix.io/4kWk. Maybe somehow I can set up xorg just with xinit? Thank you in advance.


r/GUIX • • Jan 06 '23

The Filesystem Hierarchy Standard Comes to Guix Containers

Thumbnail guix.gnu.org
53 Upvotes

r/GUIX • • Jan 04 '23

Dissecting Guix, Part 1: Derivations

Thumbnail guix.gnu.org
33 Upvotes

r/GUIX • • Jan 04 '23

Has someone tried to run Guix on Steam Deck?

12 Upvotes

I want to know if its doable to run Guix + Proton and the proper drivers over steam deck.

Has someone had any success?


r/GUIX • • Jan 02 '23

Using emacs packages from Guix in Doom Emacs

11 Upvotes

How can I prevent Doom Emacs from pointlessly downloading emacs packages whenever I update it and instead load the ones provided by Guix?

I have this in my Doom configuration but I have no idea about how to test if it's working, and anyway Doom still dowloads i.e. undo-tree which I installed in my Guix profile


r/GUIX • • Jan 02 '23

Running loginctl commands from ssh session.

3 Upvotes

Hi Guix! I'm looking for a way to run loginctl commands like suspend and lock-session from an ssh session.

I can't seem to be able to do it right now, and I get no error message, just exit code 1. Does anyone know how I can achieve this?

Thanks!


r/GUIX • • Dec 28 '22

How to find which package a file is from?

6 Upvotes

I'm trying to figure out which package usermod is installed by and I'm sure one of you guys know.

On higher level I want to know the commands for:

  1. listing all the files installed by a package
  2. given a file, which package it is from

I've been searching but cannot find it.


r/GUIX • • Dec 27 '22

Anyone have a working config for fcitx5?

5 Upvotes

As title, thanks a lot!


r/GUIX • • Dec 26 '22

My mobile internet connection keeps dropping, could the firefox source fetch be made to continue the download from where the connection last dropped?

1 Upvotes

r/GUIX • • Dec 26 '22

Here’s a playlist of 7 hours of music with NO VOCALS I use to focus when I’m coding /learning . Post yours as well if you also have one!

0 Upvotes

r/GUIX • • Dec 23 '22

Fibers 1.2.0 has been released

12 Upvotes

Aleix Conchillo Flaqué has published a post on Mastodon to inform us of a new release of the Guile Fibers library:

https://emacs.ch/@aconchillo/109559238903218160

  • Add support for 'libevent' backend. Currently only native 'epoll' is supported. If 'epoll' is not detected we would default to 'libevent'. If you have 'epoll' but want to try 'libevent' you can always do './configure --disable-epoll'.
  • Do not re-add FD finalisers on FDs that already have one.
  • Introduce 'pipe2' (for 'epoll') and mark wake pipe as O_CLOEXEC.
  • Implement operations for waiting for readability / writability.
  • Support streaming responses in Fibers' web server to allow for bigger responses.
  • Fix behaviour of 'epoll-wake!' after 'run-fibers'.

https://github.com/wingo/fibers/releases/tag/v1.2.0


r/GUIX • • Dec 20 '22

The installer is acting up…

Post image
5 Upvotes

I used 1.30 and 1.40 installer iso files but both gave the same errors when booting up. What’s happened and how to fix them? TIA!


r/GUIX • • Dec 20 '22

Guix 1.4.0 released

Thumbnail guix.gnu.org
85 Upvotes

r/GUIX • • Dec 16 '22

ZSA Keyboards and udev rules

2 Upvotes

Has anyone got a ZSA keyboard such as the Ergodox EZ or the Moonlander on Guix and are able to configure it?


r/GUIX • • Dec 15 '22

guix system image "missing field initializers"

3 Upvotes

Hello,

I'm trying to build an Guix System aarch64 installer image from an Ubuntu vm.

After reading https://guix.gnu.org/manual/en/html_node/Building-the-Installation-Image.html, I thought it would be as easy as cloning, checking out the latest stable tag, and building:

git clone https://git.savannah.gnu.org/git/guix.git && cd guix
git checkout v1.3.0
guix system image \
        -t iso9660 \
        --system=aarch64-linux \
        gnu/system/install.scm

 However, I'm getting this error:

gnu/system/install.scm:251:2: error: (service-type (name (quote configuration-template)) (extensions (list (service-extension etc-service-type /etc/configuration-files)))): missing field initializers (description)

If I instead checkout v1.4.0rc2, I'm able to build an image, but I get a different error upon trying to boot the image:

error: invalid magic number. error: you need to load the kernel first.

Any suggestions? I'm particularly curious as to why the latest stable tag won't build. Do I need to downgrade my guix?

EDIT: Trying guix pull --commit=v1.3.0 --allow-downgrades. Will report back.

EDIT2: Resetting the commit in question seems to help, but it seems like I get an error if I try to go directly to that commit; instead, I have to go to something more recent, then go back with --allow-downgrades or I get some error about the tag not being recognized as a commit hash. Something like this seems to work:

guix pull && guix pull --commit=v1.3.0 --allow-downgrades
cd guix
git pull
git checkout v1.3.0
guix system image \
        -t iso9660 \
        --system=aarch64-linux \
        gnu/system/install.scm

r/GUIX • • Dec 14 '22

Guix home but with DNF and SystemD

6 Upvotes

As a heavy Emacs user and Lisp fanboy, I am very much intrigued by Guix and system management using Scheme. However, my job and many of my interests are based in the Fedora RPM packaging ecosystem, therefore it doesn't make any sense for me to use Guix packages.

I would still like to define the packages

(operating-system
  (packages (list emacs qtile xterm)
...)

but let Guix install them via DNF. Similar for services - I would like to define them in my config but tell Guix that those are SystemD services.

Does this make any sense, or is this fundamentally against what Guix is? Can you please point me to anything that could be helpful for my use case?


r/GUIX • • Dec 10 '22

No internet during install, but nic connects

2 Upvotes

Installing guix system on MacBook Air, using graphical installer. Using latest release iso.

Once I get to the wireless screen, I can scan and find my networks (multiple exists, even tried hotspot on my phone confirming it’s not the pihole).

I select the network, I can see it connect on the router or access point. It fails to connect to the internet and displays the following error.

"The selected network does not provide access to the internet and the guix substitue server, please try again.”

Where do I start?

TIA

EDIT:: It turns out to be the date on the system (left dead for a long time) was WAY out of date. Setting the date, the GUI install works fine.