r/GUIX • u/SleepyGuyy • 11d ago
New Guix User - very exhausted and lost
I wanted a declarative distro, that didn't bind me to SystemD. So I decided to try Guix System.
my goal is to have a system that uses xmonad, and any display manager with tab navigation that isn't GDM (I don't know how to configure GDM and I find it has broken on me after updates in the past).
I have tried installing Guix following tony btw's video. His video steps do not seem to result in a working system.
so instead I use the graphical installer. I install Sway just to start. I get to a working desktop. However, it uses GDM , and I can't seem to remove it because I need %desktop-services to help me get a working desktop.
But worse than that, after my first guix pull, and guix system reconfigure, my system will no longer reach the login screen (instead reaching the terminal login screen before freezing).
I re-install Guix System, this time using the graphical installer but not selecting any desktops.
Using this tty-only graphical installed system: I can successfully update my system with guix pull, and guix system reconfigure. But when I try to add lightdm-service-type, the reconfigure command gives me the compile error "lightdm-service-type: unbound variable".
When I search Guix search lightdm, it says its under packages and display-managers. So I add display-managers to my use-package-modules. And to be safe, add lightdm to my packages list. This does not affect the error sadly.
an additional issue I am having. When I run guix system reconfigure, without sudo, I get an error regarding not having symlink permission.
What's really pissing my off if I'm trying to follow the Guix documentation and it's just sending me around in circles without answering my immediate questions. I'll read a page, get to a section that says "read X for more information about display-managers". And then end up on a page that lists display managers, but doesnt tell me how to include them in my config.scm file.
It feels like the documentation does not apply to Guix System, only to Guix, and when I follow the steps it gives me I am missing pieces.
TLDR;
I can only install a desktop using %desktop-services but then any guix pull and reconfigure will brick that setup, so I can't update.
And trying to configure my own desktop seems to lack the necessary imports.
Any help is appreciated but frankly Im just really pissed off and wanted to vent
4
u/thqloz 11d ago edited 11d ago
I’m using sway and gtkgreet, I’m not in front of the computer right now but I will share the relevant bits of my config.
EDIT:
Here is the relevant bit for setting up gtkgreet to boot sway:
(services
(append (list
(service screen-locker-service-type (screen-locker-configuration (name "gtklock")
(program (file-append gtklock "/bin/gtklock"))
(using-pam? #t)
(using-setuid? #f)))
(service greetd-service-type
(greetd-configuration
(greeter-supplementary-groups
(list "video" "input"))
(terminals
(list
(greetd-terminal-configuration
(terminal-vt "1")
(terminal-switch #t)
(default-session-command
(greetd-gtkgreet-sway-session
(gtkgreet-style
(plain-file "gtkgreet-dark.css"
"\
url(\"resource:///org/gtk/libgtk/theme/Adwaita/gtk-contained-dark.css\");
window {
background-color: #1d1d1d;
}
"))
(command (greetd-user-session
(command (file-append bash "/bin/bash"))
(command-args '("--login" "-c" "exec dbus-run-session sway"))
(extra-env '(("XDG_CURRENT_DESKTOP" . "sway")))
(xdg-session-type "wayland"))))))
(greetd-terminal-configuration
(terminal-vt "2"))
(greetd-terminal-configuration
(terminal-vt "3"))
(greetd-terminal-configuration
(terminal-vt "4"))
(greetd-terminal-configuration
(terminal-vt "5"))
(greetd-terminal-configuration
(terminal-vt "6"))))))
(modify-services %desktop-services
(delete gdm-service-type)
(delete login-service-type)
(delete mingetty-service-type)
))))
3
u/ennoausberlin 11d ago
It might be an issue with gdm. I ran into it 4 times in 7 years and switched to lightdm finally. gdm is a pain and bit me on other distros as well
2
u/SleepyGuyy 11d ago
I have successfully installed slim display manager, but I dont know how to make it use Xmonad. I also didnt want to use a display manager that couldnt switch desktops at the login screen.
2
u/Tricky-Engineer-9755 11d ago
For a DE/WM to show up on your DM it needs to be declared in your system's config under packages.
On some older hardware, GDM will fail if it is Wayland.
Try
(modify-services %desktop-services
(gdm-service-type config=>(gdm-configuration
(wayland? #f))))
2
u/wonko7 11d ago
I use slim to run the user's ~/.xsession, you could start xmonad from there.
lightdm's service is defined in (gnu services lightdm). Guix's documentation is great but I like looking at code: I look these things up in the repo, I can see how stuff is defined, I learn more about how I can use things in my config. You can just
grep -Rin 'def.*lightdm-service' /code/guix/to get started.When I run guix system reconfigure, without sudo, I get an error regarding not having symlink permission
as expected, you need to be root to do that.
2
u/Distinct_Warthog_231 10d ago
I've learned the hard way that in guix GDM is the "just (mostly) werks" approach. Slim was buggy as all get out for me (worked fine for tony so maybe there was a regression), and I could never get lightdm to properly source environment variables and launch gnome-keyring so that my gpg & ssh keys unlock on login. Bugs will periodically happen, e.g. a couple weeks ago at the gnome 49 upgrade the entire gnome-desktop was required for gdm to function. This is probably what upstream wants ofc, but guix fixed it a few days later. Fwiw I always start from a graphical install with xfce and usually just keep xfce on the system.
I would recommend the xinitrc-session package as it will allow you to launch whatever wm is defined in .xinitrc from gdm. I use it to launch dwm, no reason why xmonad wouldn't also work assuming the xmonad package does not supply a .desktop file. I've found most window managers do though.
IIRC the xinitrc-xsession did not work with lightdm, presumably because of environment reasons.
1
u/SleepyGuyy 10d ago
Its funny I JUST saw that xinitrc-session package a few minutes ago. Makes perfect sense. I guess that solves my issue with not being able to add desktops to GDM. For some reason I just really struggled to find answers that worked online.
I reinstalled Guix System, using the graphical installer but this time not selecting any desktops. So far it's handling updates well. No lock ups.
Now I kinda hate GDM. And I'm wondering if I should just launch startx from the tty. I like the simple tty login. I'm currently looking at how to make a working xinitrc file.
I'll have to learn more about keyrings and other stuff that I dont think about in a desktop environment though.
Are there any big missing features if I try to manually launch an xorg desktop like that?
2
u/SleepyGuyy 10d ago
I just wanna add everyone here has been really nice and helpful despite my mental meltdown in this post. Thank you
1
u/SleepyGuyy 7d ago
Small update. It seems when I include %desktop-services , my system locks up at the terminal login that appears just before GDM would load. I think it says "Guest login:" but I dont have it infront of me right now. On Linux 7.2
It doesn't lock up if I don't update. Linux 6.12 is what the live media installs. So if I install the desktop using the live media, on 6.12 , it loads GDM fine. But as soon as I update to 7.2 it locks up before GDM.
This time I excluded all desktops, then updated to 7.2 (worked fine). Then modified my config to include %desktop-services (and ran guix system reconfigure /etc/config.scm) , and it locked up on next boot.
So it seems like GDM is a problem on latest updates somehow. On Linux 7.2 (though the issue may have nothing to do with the kernel, I just can tell whether im in the updated system by the kernel version).
Either way I'd rather not use GDM. But am struggling to get any other display manager to install.
So I will try getting an Xorg desktop working without a display manager next.
10
u/blah1998z 11d ago
I can't say I know why
%desktop-servicesis causing things to freeze; perhaps it's a bug to report. But I can help with some of the other stuff (I hope).To swap out GDM in
%desktop-services, you can simply do something like this in place of%desktop-services:That'll delete GDM from
%desktop-servicesand prefix LightDM to that new list of services.As to why you were getting the error "lightdm-service-type: unbound variable", services are defined separately from packages (though, naturally, service will often rely on the package they're a service of).
If you had anything like
(use-service-modulesin your config., addingxorgto that should pull in the LightDM service (so(use-service-modules xorg), if that was the only one you were pulling in (for example)).Alternatively, you could use the module directly so making sure that
(gnu services xorg)was in your(use-modules(so(use-modules (gnu services xorg)), if that was the only one you were pulling in (for example)).I get the frustration; while Guix's documentation is thorough, there is an opaqueness or impenetrability about it that I can't quite place (otherwise, I'd suggest edits).
But I do find, once you've got a hang of things, Guix isn't terribly difficult to wrap your head around and, personally, I do love it quite a bit. If not here, people are also often willing to help and provide code examples or suggestions on the IRC channel, as well. But, hopefully, what I've put above should help with some progress.