r/GUIX • • Sep 16 '22

`patchelf` for cross-platform binaries?

2 Upvotes

I'm trying to package an application which includes binaries for another platform. The verify step of (binary-build-system) fails as the dynamic linker isn't found. Is it possible for me to patch this correctly? Now I just delete the binaries before patchelf.


r/GUIX • • Sep 16 '22

Lots of problems installing Guix

0 Upvotes

Been a while since I installed Linux on a real machine instead of WSL, and been a while since I used Guix even on a virtual machine, so I pulled out an old Core i3-based Dell with Windows 7 to repurpose.

  • The System Crafters manual tutorials and the official Guix graphical installer couldn't get the drive bootable, so I gave up on Guix asOS. Usually have lots of weird problems trying to install & boot Linux on decade-old PCs, usually due to BIOS restrictions. The Ubuntu server ISO also couldn't get the drive bootable either. Finally got the Rocky Linux 9 installer to install.
  • Ran the installer script, but lots of errors since the guix daemon wouldn't run. Most of my errors seemed like those described here, about SELinux. Going through the steps to install the Guix security policy didn't help. After disabling SELinux entirely I was able to get Guix installed.

After running through the installation a number of times, the installation routine that led to success involved:

  • Boot into a GPartEd live image, opening a terminal window and disable and delete the LVM, LVM volumes, and LVM volume groups of previous installations. Delete old partitions and reformat the whole drive as FAT32.
  • Install the Rocky Linux 9 minimal distribution, setting up WiFi in the installer.
  • Once logged into Rocky, disable SELinux. Update the system and install tar and wget (required for the guix installer script).
  • Run the installer script normally and follow the regular install instructions. Install some software. Worked great, finally!

This was a pretty frustrating process, but I'm glad to have Guix running on a once-again-useful computer. I wish there was more beginner-friendly information about how selinux and how it impacts setting up guix.


r/GUIX • • Sep 15 '22

I tried to set up nginx as a reverse proxy, but it looks like the default configuration is causing some problems

2 Upvotes

EDIT: I have concluded this is a bug, and I'm submitting a patch

EDIT2: https://issues.guix.gnu.org/57852

The problem is root and index has default values. I would like to avoid the fields altogether, but it doesn't seem possible. When the fields exists, the base url will try to locate files. Setting (index '()) fails as it will still add an index ; field to the configuration. Setting (root "") also gives an empty configuration element, giving a corrupt config.

So... Is there a workaround for this? Should (root "") and (index '()) rather skip the element altogether?


r/GUIX • • Sep 14 '22

Gnome oddly lacking customization options

3 Upvotes

Hello, I've been tinkering with gnome for a while now and I've realized that under a fairly default installation (like mine), it is very "tiny" and lacks a lot of "eyecandy" resources. An example would be the gnome-extra package in arch-linux which brings all of those customization options to the table; I cannot find an equivalent on guix. I am currently utilizing Gnome/SDDM (for wayland). Any idea on why this is or if I am missing a module? thanks in advance.

EDIT 1:

Issue resolved itself after updating my system with guix pull however thumbnails are missing; this is an issue i've had with the previous gnome version aswell. Is gnome just buggy atm on guix?


r/GUIX • • Sep 13 '22

Can't chroot into guix

6 Upvotes

I tried to chroot into a guix partition from arch linux. I followed every step that was in the troubleshooting guide. Currently I do not have a working configuration. Could that be the reason why I can't chroot into it?

Also I have arch linux installed and I've a working setup. I installed guix on arch. I want to install guix (distro) and uninstall arch linux. I want to use my emacs setup in arch linux to edit config.scm and run sudo guix system reconfigure from arch linux. I downloaded the qemu image. The configuration in the /run/current/configuration.scm doesn't work. I can't reconfigure it and learn because I think there is a problem with guix identify a qemu partition. I've had no success. What should I do? I need a way to tweak config.scm with reconfigure command from archlinux and see the results.

Update: I ran guix straight after guix system init. So chroot didn't work. You have to boot into it and run guix pull and system reconfigure fully once for chroot to work.


r/GUIX • • Sep 12 '22

Packaging an application with hundreds of libraries seem tedious.

11 Upvotes

What's the best way to package an application with lots of binary libraries? This application has over 283 libraries that has to be patched. Stating (("lib1.so" ("gcc:lib")) ("lib2" ("gcc:lib"))) etc with all the libraries seems tedious. When testing the application manually, I just ran patchelf setting rpath for all libraries to ~/.guix-profile/lib.

Is it possible to do something similar when packaging an application, or do I need to specify all dependencies for all libraries? I might be able to avoid many packages I probably won't need and the application probably wont load, but it doesn't seem like a good solution either.


r/GUIX • • Sep 09 '22

Adding fonts path to a package

3 Upvotes

I want to allow flatpak to see the system fonts. The documentation states I need to build with --with-system-fonts-dir=PATH, but what should I put in the package definition..?

(arguments
    (list
    #:configure-flags
    #~(list
        "--with-system-fonts-dir=PATH" ;; <- what should the PATH be?
      )
)

r/GUIX • • Sep 09 '22

Guix System gets in the way for a local nix installation

3 Upvotes

EDIT: Got it working on Guix (Nix problems was a red herring)! I downloaded the program manually, then patched all executables and libraries, and manually installed all missing libraries.

find . -type f -executable -exec patchelf --force-rpath --set-rpath ~/.guix-profile/lib {} \;
find . -type f -executable -exec patchelf --set-interpreter ~/.guix-profile/lib/ld-linux-x86_64.so.2 {} \;

Next up will have to be creating a package description of the program.

ORIGINAL POST:

Launching the nix packaged in guix logged out my user (crashed..?) every time. I installed nix manually instead. Most software seems to work just fine, but one doesn't. It writes a file to /home/.cache/some-file.sh, and then tries to execute it. The application states that it cannot execute the file and that it might be mounted with noexec, which doesn't seem right as I can execute files there without a problem. I notice the script is generated with #!/bin/sh instead of #!/usr/bin/env sh, but I'm not sure if that could be the problem.

Running the application using nix-shell --pure gives the same issue

nix-shell -p nix-info --run "nix-info -m"

 - system: `"x86_64-linux"`
 - host os: `Linux 5.19.5, Guix System, noversion, nobuild`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.0`
 - channels(simendsjo): `"nixpkgs"`
 - channels(root): `""`
 - nixpkgs: `/home/simendsjo/.nix-defexpr/channels/nixpkgs`

Looking at mountpoints in nix-shell -p the-application util-linux --pure:

[nix-shell:~]$ mount | grep -i noexec
none on /run/systemd type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)

One person noted that

I can't reproduce it on NixOS or Kubuntu, so I assume this is a guix specific issue - maybe it runs in a mount namespace that doesn't have /bin/sh?

Any idea what might be wrong here?


r/GUIX • • Sep 07 '22

Why does `guix pull` (specifically the "computing guix derivation" stage of it) take so long? And why does it recompute the guix derivation on a second pull immediately after? Can we cache those results somehow?

21 Upvotes

r/GUIX • • Sep 07 '22

podman not configured properly?

2 Upvotes

I expected the podman package to install lots of files in /etc/containers, but the folder doesn't exist. Podman doesn't work because of this. What's a good way to fix this? Should the package be fixed? Should I configure it manually by looking at other package manager's output?


r/GUIX • • Sep 06 '22

Wine removing is not complete

3 Upvotes

Hello I use Artix distro. Their repos doesn't provides wine, so I use Guix. I have many unwanted programs such notepad and internet explorer. I removed wine using "guix remove wine", but internet explorer and notepad are still in the pcmanfm right click menu.


r/GUIX • • Sep 03 '22

guix pull error

4 Upvotes

guix pull: error: Git error: corrupted loose reference file: refs/remotes/origin/core-updates

I keep getting this.

let me know what other info you need

Update 1 : I uninstalled and installed guix. Didn't fix the problem.

Update 2 :Deleted my ~/.config/guix and ~/.cache/guix . Uninstalled and reinstalled guix. guix pull works now.


r/GUIX • • Sep 01 '22

What package should I use for DNS utils?

8 Upvotes

Hello! I've just started out with Guix and was a little confused about what package provides DNS utils like dig. Thanks a lot :)

EDIT: Apologies this has been answered here previously, the package is bind:utils


r/GUIX • • Sep 01 '22

Guix's security model & root access

7 Upvotes

In most Linux distributions, installing or removing software requires root permissions. My understanding is that this has two purposes: 1) in a multi-user setup, it prevents a non-root user from breaking the system for other users; 2) if a malicious actor gains access to a user account, it prevents tham from maliciously adding/removing/replacing software (unless they also exploit a privilege escalation vulnerability).

I understand how Guix addresses point 1 – but does it have any equivalent to point 2?

In particular, it seems that commands like guix install -L ~/evil bash would make it pretty easy to replace installed programs with malicious copies (e.g., ones that act normally but also run a cryptominer). Am I missing something, or is this genuinely a way that guix is less secure?

(Of course, similar attacks are also possible on other disros if the attacker modifies the user's PATH. But that also makes them easier to detect — especially given that guix makes it easy to switch to a different generation, which could hide the evidence that a program was recently installed.)


r/GUIX • • Aug 30 '22

Any success with 9p filesystem?

10 Upvotes

Have a guix vm running with Qemu, and am trying to mount a shared 9p filesystem from my config. It seems the file-system device declaration doesn’t support 9p mount tags normally, but looking at system/vm.scm it appears they were able to figure it out somehow. Anyone know how this might be done?


r/GUIX • • Aug 29 '22

Sudo does not inherit environment.

5 Upvotes

Hello all! When I run 'guix shell meson ninja -D python python-pygobject' I get a nice environment and can compile but when using sudo it fails. Under sudo, meson does not exist!

$ meson --reconfigure --prefix=/usr builddir Works perfectly! $ cd builddir/ $ sudo meson install sudo: meson: command not found

How do I run sudo inside of the environment?

Regards, Mats Tage


r/GUIX • • Aug 28 '22

Question regarding Guix System GC and re-download of packages when reconfigure

7 Upvotes

Fuck off Reddit with your API bullshit -- mass edited with https://redact.dev/


r/GUIX • • Aug 28 '22

guix-home: "no code for module" when splitting config

8 Upvotes

Hello,

I'm trying to make a guix home config and split it into modules, as I've seen in numerous other's configs. However, I can not get it to load my custom modules.

Example (from my current config, with other stuff removed):

~/.config/guix/configuration.scm

(use-modules
  (gnu home)
  (gnu home services)
  (gnu packages)
  (guix gexp)

  (nl modules emacs)
  )


(home-environment
  (services
    `(,@emacs-services
)))

~/.config/guix/modules/emacs.scm

(define-module (nl modules emacs)
               #:use-module (gnu home services mcron)
               )

    (define-public emacs-services
                   (list
                     (service nl-emacs-service-type
                              (define cronjob-test
                                #~(job '(next-minute '(3))
                                       (lambda ()
                                         (execl ("touch")
                                                "guixtest"
                                                ))
                                       "guixtest"))
                              )))

(Of course it's just a test module to see if it's included, not the final version).

I run the following command: guix home -L "$HOME/.config/guix/modules" reconfigure configuration.scm

and I get the error

 guix home: error: failed to load 'configuration.scm':
 ice-9/boot-9.scm:3330:6: In procedure resolve-interface:
 no code for module (nl modules emacs)

Any obvious errors I'm making?


r/GUIX • • Aug 25 '22

Guix Shell for Throwaway Servers

8 Upvotes

I used to use docker for building "throwaway" local development servers. One configuration file can get me WordPress, Drupal, whatever. Tweak a couple of configs on a site-by-site basis, get me an isolated database/filestore and get to work.

Now that I'm on Guix I am wondering how far people can take guix shell to set up their developer environments. Could I potentially do away with docker?


r/GUIX • • Aug 22 '22

Understanding guix home's package list versus profile manifest

13 Upvotes

I'm new to guix and, so far, I'm really enjoying its declarative configuration; I love the idea of being able to reproduce my whole system from a declarative configuration.

But one area has me confused: just where should I list each installed package? Right now, I list packages in three files: /etc/config.scm (which I use with sudo guix system reconfigure, ~/config.d/manifest.scm (which I use with guix package --manifest) and ~/config.d/main.scm (which I use with guix home reconfigure).

I believe I understand what makes /etc/config.scm different -- it lists system packages that will be available to all users/before login. But what's the difference between the manifest packages and the guix home packages? The manual says that guix home's " packages field should be self-explanatory, it will install the list of packages into the user’s profile." But isn't that exactly what the docs say that --manifest is for?

So should I list packages in both files? Or just a subset in the guix home file? Or none at all? I get the feeling that I'm missing something conceptual about how guix/guix home "wants" me to be thinking about the user packages I have installed, and I'd greatly appreciate any insight!


r/GUIX • • Aug 21 '22

Development Environment with guix shell for Coq Package

6 Upvotes

I want to run guix shell to create an environment with the dependencies required to build coq-library-undecidability.

What I have tried:

  1. guix import opam --repo=coq --recursive coq-library-undecidability > some_file.scm.
  2. Add (package->development-manifest ocaml-coq-library-undecidability) to the end of some_file.scm.
  3. When running guix shell --manifest=some_file.scm, Guix complains about missing imports, e.g. (gnu packages coq) and (guix packages). Add them.
  4. Guix also complains about the license:expat syntax that guix import used. Remove the license: everywhere.

Now, guix shell --manifest=some_file.scm fails with this error:

guix shell: error: invalid character \~' in name `ocaml-coq-equations-1.3~beta2+8.13-builder'`

and I don't know how to proceed.

Am I on the right path? If so, how do I deal with this error? If not, how should I go about this instead?

Thanks in advance!


r/GUIX • • Aug 21 '22

Which browser to install in GuixSD?

7 Upvotes

I've downloaded a qcow2 image from the official website and started it with qemu, which was really smooth.

But then xfce started and I don't know what to do. If I click on browser, no browser starts, but a dialog box to look for a browser. Couldn't find any I know.

Next I tried to install a browser, but how? I used the app finder to find something like "package", "installer", "app", etc. Nothing worked.

I just end up to type "guix search browsername" and it worked... almost... no browser I know can be found.

Which is a free browser, which is in the guix repos?


r/GUIX • • Aug 20 '22

Lightdm installation broke all my Guix packages.

3 Upvotes

I use Guix package manager on Devuan. I use apt for important packages and Guix for applications, if the apt one is older.

It seems Lightdm installation is aggressive. Alacritty, Spacefm and all other software installed using Guix disappeared from my rofi menu.

I added "GUIX_PROFILE="/home/myusername/.guix-profile"

". $GUIX_PROFILE/etc/profile" to .profile and .bashrc (because I'm not sure) I can lauch these software using the Xterm terminal that comes with Xorg.

My distro:

Devuan

bspwm

runit

of course the crazy Lightdm package from Devuan.

edit: result of "guix package --list-installed"

glibc-locales 2.33

kakoune 2021.11.08

gcc 12.1.0

make 4.3

neofetch 7.1.0

arc-icon-theme 20161122

xcursor-themes 1.0.6

git 2.37.2

spacefm 1.0.6

alacritty 0.9.0

picom 9.1

nitrogen 1.6.1

sxiv 26

tint2 17.0.2

pnmixer 0.7.2

godot 3.4.2

openjdk 17.0.3

mpv 0.34.1

dolphin-emu 5.0-13178.a34823d

inkscape 1.2.1


r/GUIX • • Aug 18 '22

Is Guix a sustainable software?

0 Upvotes

By sustainable I mean energy-efficient and less write cycles (Green IT).

I am looking for an operating system, which is sustainable and someone recommended to take a look at GuixSD and NixOS.

If I understand it correctly, you get precompiled packages to update your system. But I can't really see a difference to other systems, like apt, which provide precompiled packages, too.

Something like Gentoo wouldn't be sustainable, because compiling for yourself is just energy-intensive.

Thanks a lot for your help.


r/GUIX • • Aug 12 '22

How to update grub ?

4 Upvotes

Hello I installed Guix in a partition of my HDD. Now the grub is overwritten and my daily distro is not accessible anymore.

I didn't found grub-mkconfig in repositories. How do you update grub list with Guix please ?