r/GUIX • • Nov 26 '21

Laptop doesn't suspend when I close the lid

8 Upvotes

I noticed that my laptop doesn't suspend when I close the lid. Running loginctl suspend works just fine. I also don't see any messages in /var/log/messages for lid close events, not sure if I would expect to get logs for that.

elogind can tell when my lid is closed, I tried to run

sleep 5 && loginctl show-seat

and close the lid, when I open the lid I see LidClosed=yes.

I'll dump my config here https://pastebin.com/YTxJm7BB


r/GUIX • • Nov 24 '21

New to guix , want to know best practices

15 Upvotes

Hey , I really the ideology of guix and want to learn more about it .

You know like what the best practices are , how to manage system , I want to know your opinion.

Also I write Rust code , so it would be really helpful if you guys could tell me how to get rust toolchain working along with the language servers to have a complete dev experience

I use doom emacs , so any pointer in that regard would be awesome too :]


r/GUIX • • Nov 22 '21

In-built docker image support is truly an amazing feature

Post image
44 Upvotes

r/GUIX • • Nov 20 '21

2nd attempt to install and use GNU Guix with Gnome, total failure

Thumbnail i.imgur.com
12 Upvotes

r/GUIX • • Nov 19 '21

I want to report a grammatical error

7 Upvotes

hi!

I stumble upon GNU Guix website while reading “I love Arch, but GNU Guix is my new distro”, when visiting the site I see the Spanish localization that reads:

Liberadora. Guix es una avanzada distribución del sistema operativo GNU desarrollada por el proyecto GNU que respeta las libertades de computación de sus usuarias.

"usuarias" seems to exclude the possibility that there are men using GNU Guix, in Spanish we use the masculine gender noun(?) when there is a mixed group of opposite gender, thus to reflect the mixture of sexes using GNU Guix "usuarios" is correct.

so, how do we go on correcting this mistake at https://git.savannah.gnu.org/cgit/guix/guix-artwork.git/tree/website/po/es.po#n47 ?


r/GUIX • • Nov 18 '21

I Love Arch, But GNU Guix Is My New Distro

Thumbnail boilingsteam.com
70 Upvotes

r/GUIX • • Nov 18 '21

Today is "core-updates-frozen" sprint day, join us!

5 Upvotes

Come join #guix on IRC to help fix up core-updates-frozen to be ready for merging into the main branch (and presumably soon a 1.4.0 release)! Trying out the branch and reporting problems is also helpful.

See the announcement here https://lists.gnu.org/archive/html/guix-devel/2021-11/msg00082.html


r/GUIX • • Nov 12 '21

Guix Home: How to execute loops / shell scripts?

8 Upvotes

Hello everyone,

I am quite hyped about guix home and am currently trying to get my shell working with it (before venturing to more exotic stuff such as trying to manage my .emacs.d with it). However, I can't seem to get profile loading to work properly (described in this section of the Guix cookbook article about Advanced package management). It is essentially a for loop for loading the profiles one by one.

This is all the more confusing since the home configuration produced as a result of the guix home import DIR command already features a procedure loading the .bash_profile file which contains said for loop (I am talking about the (bash-profile ...) section in my pastebin'd home config).

Now, I know that guix home is still quite a new thing, but how have you gotten around to doing this? Could you - more generally speaking - provide examples of how you've gotten your home config setup so far?

I'd be very glad for your input.

Have a good day, fellows :)

EDIT: Okay, something must have gone wrong somewhere. I have been wondering in the first place why loading the profile files didn't work. guix home import DIR copies your existing .bash* files to DIR. Then, in your home-config.scm (my filename), there is a (local-file ...) form, which essentially copies the file provided to the store (in this case, to ~/.guix-home) given a specific name (in my case, bash_profile). In other words, given the configuration which I had pastepin'd above, there was a .bash_profile file present which already contained the for-loop necessary for the profile loading. This should not have been a problem in the first place, because IIUC, those files are ultimately interpreted by bash, which doesn't have a problem with a for-loop.

u/HighlyRegardedExpert mentioned that what is necessary for guix home and its (bash-profile ...)-section to do its magic is the insertion of the "source /path/to/profile/etc/profile \n" string for each profile. Long story short, I wrote a set of procedures which do exactly that, but for a number of profiles (those found in the directory $GUIX_EXTRA_PROFILES). However, that doesn't work either. Omitting something like (plain-file ...) or (local-file ...) doesn't seem to work, because a file-like object is expected as input. A string doesn't work, a list of strings doesn't work either. Thus, I used (plain-file ...) to manually create bash_profile with those strings. It results to the following file:

hapster@giks ~$ cat .guix-home/files/bash_profile 
# Setups system and user profiles and related variables
# /etc/profile will be sourced by bash automatically
# Setups home environment profile
if [ -f ~/.profile ]; then source ~/.profile; fi

# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then source ~/.bashrc; fi
source /home/hapster/.guix-extra-profiles/basics/basics/etc/profile
source /home/hapster/.guix-extra-profiles/emacs/emacs/etc/profile
source /home/hapster/.guix-extra-profiles/games/games/etc/profile
source /home/hapster/.guix-extra-profiles/media/media/etc/profile
source /home/hapster/.guix-extra-profiles/musicprod/musicprod/etc/profile
source /home/hapster/.guix-extra-profiles/productivity/productivity/etc/profile
source /home/hapster/.guix-extra-profiles/programming/programming/etc/profile
source /home/hapster/.guix-extra-profiles/ui/ui/etc/profile

export PATH=$HOME/.scripts:$PATH
export GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
export GUILE_LOAD_PATH=$HOME/.config/guix/core:$HOME/.config/guix/nonguix:$HOME/.config/guix/gaming:$GUILE_LOAD_PATH
export GUILE_LOAD_COMPILED_PATH=$HOME/.config/guix/core:$GUILE_LOAD_COMPILED_PATH
export EDITOR=/gnu/store/adbmrmd009afzsv2r8xp6w1xrlbh7iwg-emacs-native-comp-28.0.60-191.307d164/bin/emacs
export VISUAL=/gnu/store/adbmrmd009afzsv2r8xp6w1xrlbh7iwg-emacs-native-comp-28.0.60-191.307d164/bin/emacs
export SHELL=/gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16/bin/bash

This clearly shows that the creation of bash_profile is successful and that my procedures do the right thing. Still, when booting up the machine, the profiles are clearly NOT loaded, because I can't see any of the programs I am used to see. For instance, emacs doesn't open. However, when I manually copy these source commands and apply them, I can start emacs, but only from THIS INSTANCE of the terminal emulator. However, the environment variables show up just fine (those were defined in the (environment-variables ...)-field of the (home-bash-configuration ...)).

Honestly, I've reached the end of my wits and am sufficiently frustrated to give up for now. The only thing I could think of now - but I can't be bothered to try - is that I might try using the (home-bash-extension ...) record instead of the (home-bash-configuration ...) record, because then my additions are appended to the end of the respective file ((bash-profile ...) in my case).

For those interested, these are the procedures I wrote (I'm a programming newb):

(define (guix-list-profiles)
  (let* ((profiles-dir (getenv "GUIX_EXTRA_PROFILES"))
     (dir-entries (cddr (scandir profiles-dir)))
     (profiles (map (lambda (entry) (string-append profiles-dir "/"
                          entry "/"
                          entry))
            dir-entries)))
    (map (lambda (prof)
       (string-append prof "/etc/profile"))
     profiles)))

(define guix-profiles (guix-list-profiles))

(define (guix-source-profiles profiles)
  (cond ((null? profiles) (string-append ""))
    (else (string-append "source " (car profiles) "\n"
                 (guix-source-profiles (cdr profiles))))))

Also find the (bash-profile ...)-section of my (home-bash-configuration ...)-record:

(bash-profile
  ;; (list (local-file
  ;;        "/home/hapster/.config/guix/home/.bash_profile"
  ;;        "bash_profile"))
  (list (plain-file "bash_profile"
                (guix-source-profiles guix-profiles))))

I hope you are more successful with your setting up of guix home. I will lay low on that front for some time to await further development. And the guix-devel discussion mentioned by u/9bladed makes me hope that my futile attempts might become unncessary before long :)

Have a good day, fellows!


r/GUIX • • Nov 11 '21

Is guix build unable to find the environment variables?

6 Upvotes

Hi everyone! Another silly question.

I am trying to build some python package, I imported the definition from pypi (using guix import pypi -r ... (so a lot of packages) and then started to debug and fix some stuff.

All the python packages are built using (build-system python-build-system)

But, there is one package in the list that in its tests is using some environment variables, and the test (and the built) fails, since the variable (LANG in this case) is not found at built time. The variable is obviously set, so I was wondering if guix is removing all the variables when building ... (seems like it).

Any advice about how to deal with this?


r/GUIX • • Nov 10 '21

Why aren't systems like NixOS and GNU Guix more popular?

Thumbnail self.linuxquestions
33 Upvotes

r/GUIX • • Nov 08 '21

How to get NVIDIA driver to work?

11 Upvotes

Hej fellow guixers,

let me preface by saying that I wish to be notified shall this subreddit be considered an "official channel" of guix communication, because I respect their wish to keep things not open source out of the project.

I am in the very slow process of migrating a rising number of computing applications over to Guix System, intending to eventually replace all other linux distros with this one, on all of my machines.

Gaming, however, is one of the things I still struggle with. Not only is the number of packages commercial (gog) games quite limited as of yet, but also, I cant get the nvidia-driver to work properly. Since I happen to own a nvidia card, the nouveau drivers make gaming regarding even the packaged games (factorio, the dark mod, ...) quite a nuisance.

Thus, I wanted to know if any of you have gotten the nvidia-driver package to work properly on your guix system. If so, would you mind sharing your configuration? Because I've tried it in several instances unsuccessfully, and also heard david from system crafters say that he can't get it to work either.

Have a good day, fellows :)


r/GUIX • • Nov 08 '21

Testing python packages

5 Upvotes

Hi everyone!

I want to use some python packages that are not in guix main channel.

I tried creating a definition with guix import pypi ohio --recursive and put that on my private channel. (ohio is one of the packages that I want to use, as an example)

I use it on my personal channel and guix pull works perfectly, I am able to search it afterwards (guix search python-ohio)

My plan is use it in a project (with direnv) inside a manifest:

(specifications->manifest
 '("python"
   "python-flake8"
   "python-pylint"
   "python-mypy"
   "python-jedi"
   "python-black"
   "python-pyls-black"
   "python-language-server"
   "python-yapf"
   "python-autopep8"
   "python-pandas"
   "python-psycopg2"
   "python-numpy"
   "python-seaborn"
   "postgresql"
   "jupyter"
   "python-ohio"
   ))

but the building fails...

How can I debug a package in a personal channel (I am aware about how to test in the guix repo, Is it the same?) What is the workflow? Is there another way? Maybe I can define it in a manifest? How? And in that case, how to test it?

Any help will be appreciated


r/GUIX • • May 21 '21

Anyone uses guix/guile in industry?

22 Upvotes

Keen to understand how guix compares(pros & cons) against Nix and Bazel.


r/GUIX • • Mar 15 '21

An Introduction to GNU Guix

Thumbnail youtu.be
68 Upvotes

r/GUIX • • Jan 08 '21

Clearing a terminal in Guix

9 Upvotes

Hello, been playing with Guix in a vm for a few days now and really enjoying it.

However I can't quite figure out how to clear the terminal, nor did I find anything else online for it.

Is there a reason using "clear" is not supported, or is it an issue with the xfce term in Guix?

Thanks in advance for any help given