Can anyone look at my setup and tell me where i went wrong?

i’m asking for help with my guix setup. i followed david guidelines for a modular system. however i can’t get gaming to work or emacs for coding in python and etc. can someone look at my setup i have on codeberg. since i can’t i on here? please any advice would be great. the naming scheme might look silly but i did that way because i wanted to make it easy for me to remember where stuff was. It themed after transformers. Yes those transformers. anyway please if you like to spare anytime i’m greatful.

~/.dotfiles/
├── channels.scm
└── transformers/
├── systems/
│ ├── unicron.scm # base — all machines inherit from here
│ ├── galvatron.scm # PC (VoidOS)
│ └── cyclonus.scm # Laptop
├── hardware/
│ └── soundwave.scm # kernel, initrd, firmware
├── users/
│ └── shockwave.scm # user accounts
├── packages/
│ └── wheeljack.scm # system packages
├── services/
│ └── starscream.scm # desktop services
└── home/
├── home-config.scm # guix home environment
└── services/
└── shell.scm # fish + starship

Galva-tron notifications@systemcrafters.discoursemail.com writes:

however i can’t get gaming to work or emacs for coding in python and etc.

What are the specific issues?

For Emacs, are you just not understanding how to load python and python
libraries into the profile so you can eval code and stuff from within
Emacs? That would require the emacs-guix package and loading the
profile, or start using direnv + envrc Emacs package to do it
automatically…or just install everything to your home config, but that
will not scale well.

my issues is that how get steam up and running. also is my setup look good?

IMO there aren’t enough services on your systems.

Can you run this on the system you want us to look at?

t=$(mktemp -d)

# either with `-e (@ (myscheme module) my-public-system)`
guix system -L ellipsis/ -L dc/ shepherd-graph  -e '(@ (ellipsis system usb-gpg-tools) usb-gpg-tools-amd)' | dot -Tpng > $t/usb-gpg-tools-amd.png

# or with the filename
guix system -L ellipsis/ -L dc/ shepherd-graph ellipsis/system/usb-gpg-tools.scm| dot -Tpng > $t/usb-gpg-tools-amd.png

This is for a console-only GPG appliance, so it’s fairly simple

Your project really isn’t a bad start. It’s actually pretty difficult to get that far. Don’t be discouraged.

Also – i think i recall from other threads that you have some really nice hardware. Keep in mind that it’s perfectly fine to install something besides Guix on it – and also fine to use a VM-based workflow.

It’s hard to get dotfiles repos to work across multiple distributions though. Nix home-manager and guix home are some ways to do that – though for guix home on foreign distribution, you’ll have to be okay with systemd running some user services and shepherd running others.

If you really want to use Guix System, learn to identify the specific “escape hatches” you’ll need for kinds of situations. This could be:

  • docker for data science stuff or just Google Colab
  • installing Nix alongside Guix to expand the set of packages you have access to
  • or running a windows VM in Azure. i had to do that for CAD homework in school. (don’t forget to set it to auto-shutdown)

If you don’t identify those kinds of tools to use (before you’re in the situation where you need it), you’ll run into trouble. It can take a long time to learn these tools.

Questions & Points

What do you need python for?

How you need to use python sorta determines how you’d want to interact with it.

  • do you need ipython kernels for jupyter-lab?
  • python can be problematic on guix. There is now the uv package in gnu/packages/rust-apps.scm and if that works … holy crap that’s a lifesaver. in any case

I mentioned the VM-based workflow because python/jupyter can be more difficult, especially if you want the GPU for machine learning. It’s not impossible, but idk what the state of rocm is on Guix. For me, getting a rocm environment running on NixOS with python/tensorflow libraries is fairly challenging. On NixOS, these python libraries require customization for rocm since they all have pretty hard dependencies on nvidia.

Docker is usually a good way around the issues for rocm. Or other packaging issues with python dependencies. You just need to learn how to set “caps” on the container for GPU, pass raw devices and pass a socket – these are the same kinds of things you’d pass into a guix container for hardware access.

Hardware Requirements?

This will come up a bit.

  • Do you know how to add udev-rules? Check whether you need a kernel module? etc…
  • How do you plan on discovering hardware requirements?

How were you planning to install steam?

See nongnu/packages/game-client.scm for one option. However, I used flatpak for this when I installed Steam on Guix.

  • where are you installing games?

Other questions

Ignore the rest of this if it seems TMI or these aren’t issues you’re worried about yet. Also, if anyone can correct me on some of this, it would help me a ton.

You have emacs installed twice

You should probably remove it from one of these. It’s perfectly valid, but will cause issues if you’re not intentionally structuring how you use it. e.g.

  • if emacs-client 31.0 gets called to connect to a socket for emacs 30.2 server
  • libraries compiled for emacs 31.0 are being loaded emacs 30.2

TLDR: just be intentional with how you’re starting emacs and where it’s installed

Usually Guix handles the compatibility stuff for nativecomp emacs packages fairly well… at least for me it did, until i went to use straight.el. So you need to pick one of these options:

  • manifest with emacs-.* packages from guix for everything
  • manifest that installs ONLY emacs from guix packages (this provides many core nativecomp elisp dependencies) and then installs a framework on top of that.

For emacs-geiser & emacs-guix

You need to ensure that GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH are consistent in your shell’s path & inside emacs. See 22.5.1 in The Perfect Setup

For me, guix.el was extremely confusing (mainly issues with GUILE_LOAD_PATH on foreign distro vs Guix System). The emacs-lisp library also contains some scheme that must load. By running guix install for this, it ensures you have a basic GUILE_LOAD_PATH that’s set up.

On Guix System, this is less of an issue. For me on NixOS, I just found out that GUILE_LOAD_PATH was blank. So M-x guix was not working because the guix-repl was not loading. After a guix install to ~/.guix-profile

Also, it’s a bit hard to help without knowing more about your experience with programming, git, linux, etc.

It’s easier to learn more faster if you keep in mind the socrates quote “I only know that I don’t know.”

In your .spacemacs, your 'packages-selected-packages will probably install these to ~/.emacs.d/elpa, but it may compile them to .elc or .eln.

That’s what i’m referring to above with the emacs compatibility issues. Occasionally, you may need to reinstall those package or at least rebuild them.

Guix Desktop Systems

There’s a limit on number of consecutive replies (smh lol), but hopefully these graphs help you conceptualize what’s needed or what could be possible.

It took me awhile to get these running again. I used the X11 system for a few years, but it’s changed significantly since i’ve run it. The wayland system I at least got booting, but then switched over to NixOS. So keep in mind there could be some mistakes.

# need to export these to be available in subshells
export t=$(mktemp -d)
export system_x11=kharis-x11
export system_wayland=kharis-x11

# produce the .dot graph files
guix system -L ellipsis/ -L dc/ shepherd-graph \
  "dc/dc/system/$system_x11.scm" > "$t/$system_x11.dot"
guix system -L ellipsis/ -L dc/ shepherd-graph \
  "dc/dc/system/$system_wayland.scm" > "$t/$system_wayland.dot"

# produce the images 
guix system -L ellipsis/ -L dc/ shepherd-graph \
  "dc/dc/system/$system_x11.scm" | dot -Tpng > "$t/$system_x11.png"
guix system -L ellipsis/ -L dc/ shepherd-graph \
  "dc/dc/system/$system_wayland.scm" | dot -Tpng > "$t/$system_wayland.png"

# for basic comparison (at least for simple cases), these can sort because they're flat graphs 
# (i.e. only one edge definition per line, with deterministically computed node id's)
diff <(cat $t/$system_x11.dot | sort) \
  <(cat $t/$system_wayland.dot | sort) > $t/kharis.diff.txt

kharis (wayland)

kharis-x11

Here’s the diff. Open in emacs and run M-x diff-mode. This shows the differences in services between a wayland system and an X11 system, where they’re otherwise basically the same.

Keep in mind there may be a few mistakes… it’s been awhile since I’ve actually run these

kharis.diff.txt (4.8 KB)

hey thank you for the insight. I believe I’m just fundamentally failing to understand the limits on guix and nix. I’m coming from a thought process that i can reproduce what my setup is on fedora. my struggle in trying to make guix my daily driver right now is everything is not 1 to 1. what i could do in fedora or debian is totally different in guix. So im still working on building this out. My use case is for all purpose machine with gaming, media and programming. I’m currently focus on learning python but with c, lisp, go and java in the background for weeks now.
the other struggle I’m, having is the random crashes and freezes that i don’t get in fedora. some have suggested that i run guix or nix on top fedora. maybe that will work? i don’t understand it enough. if it is just a package manager then do i really need that? or can i do more with it? Also outside of systemcrafters youtube there isn’t another strong resource on guix.

Its more than just a package manager, since Guix System and NixOS manage system services if installed as the system. To me, programming the service definitions is a huge advantage… but it also potentially introduces a lot of problems.

Guix and Nix are still valuable on top of Fedora as package managers, especially since you can build VM images. Then you can practice building a Guix system without underlying hardware issues.

It sounds like you have a hardware issue or some kind of misconfiguration of sleep/bios, but it’s difficult to diagnose