[ prog / sol / mona ]

prog


Guix

90 2022-05-25 06:49

>>67
>>69
I know this is late, but using Guix without a login manager is possible. The main problem is that the default startx script uses paths that conflict with how Guix does things, so you should write your own version instead.
You also need to remove the login manager from the list of desktop services, with something like this:

(use-modules (gnu)
             ...            ; some other modules
             (srfi srfi-1)) ; for remove
(operating-system
  ... ; some stuff
  (services
   (remove (lambda (service)
              (memq (service-type-name
                      (service-kind service))
                     '(gdm ; you can add some others to remove, like network-manager)))
            %desktop-services)))

You need to install all of the packages required as well, like Xorg or xinit. There is an undocumented Xorg service type, but it doesn't seem to work well. I don't have a big X config, so I just use a simple-service of etc-service-type to put a small xorg.conf into /etc with XkbLayout and few other things.

And here is the startx script I glued together, maybe you can use it as a starting point for something of your own:

#!/bin/sh
DIR="/run/current-system/profile"
HOMDIR="$HOME"/.guix-profile
DISPLAYNUM=0
while true ; do
    [ -e "/tmp/.X${DISPLAYNUM}-lock" -o -S "/tmp/.X11-unix/X${DISPLAYNUM}" ] || break
    DISPLAYNUM="$(( DISPLAYNUM + 1 ))"
done
XINIT="$(command -v xinit)"
XORG="$(command -v Xorg)"
[ -x "$XINIT" ] || XINIT="$HOMDIR"/bin/xinit
[ -x "$XORG" ] || { XORG="$DIR"/bin/Xorg && DIR="$HOMDIR"; }
TTYNUM="$(tty | awk '{print substr($0, match($0, "[0-9]+$"))}')"
$XINIT -- $XORG :"$DISPLAYNUM" vt"$TTYNUM" -keeptty -ardelay 200 -arinterval 40 -configdir "$DIR"/share/X11/xorg.conf.d -modulepath "$DIR"/lib/xorg/modules

I just put it in my $HOME script directory in my path, but I doubt it would take much effort to make a simple package out of this, if you want to keep it with the other executables.

For things like this I found the mailing list (https://lists.gnu.org/archive/html/help-guix/) to be of a much bigger help than the manual. Looking directly into the source code can be very educational as well.

106


VIP:

do not edit these