help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

%desktop-services #:select service alsa-service-type - unbound variable


From: znavko
Subject: %desktop-services #:select service alsa-service-type - unbound variable
Date: Thu, 20 Sep 2018 14:31:28 +0000

Hello! I respect GuixSD ideas, guix developers' work and want to use guix opportunities.
I am novice in Scheme language. I prefer wpa-supplicant + dhclient without networkmanager (cause I had troubles with nm-dispatcher on funtoo).
I want to write my /etc/config.scm without networkmanager and d-bus (cause I think only networkmanager in my config needs it) .
As I know it appears in my system from %desktop-services variable defined here https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/desktop.scm
So I have no sense about #:select, but as saw I try to get from %desktop-services all services I need except ntpd, networkmanager, avahi, polkid.

I type /etc/config.scm and `guix system reconfigure /etc/config.scm` repeatedly say me to use module, and I add them into use-modules variable. But in the end it shows me the error:
# guix system reconfigure /etc/config.scm
/etc/config.scm:27:9: alsa-service-type: unbound variable
hint: Did you forget a `use-modules' form?

# cat /etc/config.scm
;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce where the
;; root partition is encrypted with LUKS.


(use-modules (gnu) (gnu system nss)
             (gnu services xorg)
             (gnu packages libusb)
             (gnu services networking)
             (gnu services audio)
             (gnu packages linux)
             (gnu services dbus)
            
)
(use-service-modules desktop)
(use-package-modules certs gnome)

(operating-system
  (host-name "antelope")
  (timezone "Europe/Moscow")
  (locale "en_US.utf8")

  (bootloader (bootloader-configuration
                (bootloader grub-bootloader)
                (target "/dev/sda")))

  (file-systems (cons (file-system
                        (device "/dev/sda1")
                        (mount-point "/")
                        (type "ext4")
                        )
                      %base-file-systems))

  (swap-devices '("/dev/sda2"))

  (users (cons* (user-account
                (name "bob")
                (comment "bob is good too")
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video"))
                (home-directory "/home/bob"))
          
      (user-account
                (name "alice")
                (comment "alice is bobs sister")
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video"))
                (home-directory "/home/alice"))

               %base-user-accounts))

  ;; This is where we specify system-wide packages.
  (packages (cons* nss-certs         ;for HTTPS access
                   gvfs              ;for user mounts
                   %base-packages))

  ;; Add GNOME and/or Xfce---we can choose at the log-in
  ;; screen with F1.  Use the "desktop" services, which
  ;; include the X11 log-in service, networking with
  ;; NetworkManager, and more.
  ;; from here https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/desktop.scm#n971

  (services (cons* (xfce-desktop-service)
                   (%desktop-services
                      #:select ((service slim-service-type)
                                (simple-service 'mtp udev-service-type (list libmtp))
                                (service wpa-supplicant-service-type)
                                (udisks-service)
                                (upower-service)
                                (accountsservice-service)
                                (colord-service)
                                (geoclue-service)
                                (elogind-service)
                                (dbus-service)
                                x11-socket-directory-service

                                (service alsa-service-type)
                                %base-services                               
                      )
                    )
  ))

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))


How to deal with these variables?
I need to have:
- wpa-supplicant service that runs automatically after system run (or better after user login) and uses /etc/wpa_supplicant.conf file
- dhclient tha automatically starts after wpa-supplicant and works with wlp2s0

Now I connec to the wifi like this:
# su
# cat /root/1
#!/bin/sh
#connect to wi-fi through wpa_supplicant
herd stop wpa-supplicant
wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant.conf
sleep 4
dhclient -v wlp2s0

# ./1

Help me to write config for wpa-supplicant + dhclient services.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]