unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: <znavko@tutanota.com>
To: Znavko <znavko@tutanota.com>
Cc: Help Guix <help-guix@gnu.org>
Subject: Re: wpa-supplicant service configuration. Guile is hard
Date: Thu, 4 Apr 2019 22:36:43 +0200 (CEST)	[thread overview]
Message-ID: <Lbe0PNU--3-1@tutanota.com> (raw)
In-Reply-To: <LbdoDpd--3-1@tutanota.com-LbdrIe9----1>


[-- Attachment #1.1: Type: text/plain, Size: 1375 bytes --]

Hi! There actually were wpa-supplicant config twice. The necessary one is in the (modify-services) section. I rest only  that one. And it works. But the network is not working, cause dhcpd is not configured. I really want to get around 
"dhcpcd@.service causes slow startup" https://wiki.archlinux.org/index.php/Dhcpcd <https://wiki.archlinux.org/index.php/Dhcpcd>

Would you give some advises how to prevent slow booting? How to set timeout on wpa-supplicant service and dhcpcd that they'll start after slim shows me auth form?

My actual manual network start is this:

# cat startnet
#!/bin/sh

#connect to wi-fi through wpa_supplicant

herd stop wpa-supplicant
rfkill unblock wifi
wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
sleep 2
dhclient -v wlp2s0

May be I can use dhclient service or something like that instead of dhcpcd?

I attached my current workable config, but dhcpcd is commented there. Also I do not know how to write dhcpd.conf for my case?


Apr 4, 2019, 7:26 PM by znavko@tutanota.com:

> Hello! I am so novice in Guile.
> I have trouble trying to add wpa-supplicant configuration to my config. I get this error:
>
> # guix system reconfigure /etc/config.scm
> guix system: error: service 'wpa-supplicant' provided more than once
>
> Please, let me know where to place my wpa-config lines?
>


[-- Attachment #1.2: Type: text/html, Size: 2818 bytes --]

[-- Attachment #2: config-wpa-dhcp.conf --]
[-- Type: application/octet-stream, Size: 4273 bytes --]

;;this is znavko's cute config

(use-modules (gnu) (gnu system nss)
             (gnu system locale) ;;for locale-definition
             (gnu services desktop)
             ;;(gnu services dns) ;;for dnsmasq
             (srfi srfi-1) ;;for remove function
             (gnu services networking) ;;for remove ntp
             (gnu services avahi) ;;for remove avahi
             (gnu services xorg)
             ;;(gnu services databases);;for postgres
             (gnu packages admin) ;;for wpa_supplicant
)
(use-service-modules desktop)
(use-package-modules certs gnome)

;;(define %redundant-linux-modules '("pcspkr" "snd_pcsp"))

(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") (group "users")
                (supplementary-groups '("wheel" "netdev" "audio" "video"))
                (home-directory "/home/bob"))
                (user-account (name "mom") (group "users")
                (supplementary-groups '("wheel" "netdev" "audio" "video"))
                (home-directory "/home/mom"))
               %base-user-accounts))

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

  (services (cons*  
                    ;;(service postgresql-service-type)
                    (service xfce-desktop-service-type)
                    ;;(service wpa-supplicant-service-type 
                    ;;  (wpa-supplicant-configuration
                    ;;    (config-file "/etc/wpa_supplicant/wpa_supplicant.conf")))

                    ;;(service dhcpd-service-type
                    ;;  (dhcpd-configuration
                    ;;    (config-file  (local-file "/etc/dhcpd.conf"))
                    ;;    (interfaces '("wlp2s0"))))


                    (modify-services      
                      (remove (lambda (service)
                        (eq? (service-kind service)
                          ntp-service-type))
                         (remove (lambda (service)
                           (eq? (service-kind service)
                             avahi-service-type))

                              (modify-services  
                                (modify-services %desktop-services
                                  (slim-service-type config =>
                                    (slim-configuration
                                      (xorg-configuration
                                        (xorg-configuration
                                          (extra-config
                                                    
'("Section \"InputClass\"
        Identifier \"touchpad\"
        Driver \"libinput\"
        MatchIsTouchpad \"on\"
        Option \"Tapping\" \"on\"
EndSection")
                                            )))))
                                 )  ;end of modify-services 3rd

                                 (wpa-supplicant-service-type config =>
                                   (wpa-supplicant-configuration
                                     (config-file "/etc/wpa_supplicant/wpa_supplicant.conf")))

                               )  ;end of modify-services 2nd

                            )  ;end of remove avahi
                          )  ;end of remove2 ntp
                      (elogind-service-type
                        c => (elogind-configuration (handle-lid-switch 'ignore)))
                    );;end of modify-services 1st desktop-services
  ));;end of services

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


 (kernel-arguments '("modprobe.blacklist=pcspkr,snd_pcsp"))
 ;(kernel-arguments
 ;    (list (string-append "modprobe.blacklist="
 ;                         (apply comma-separated
 ;   %redundant-linux-modules))))

);;end of operating-system

  


       reply	other threads:[~2019-04-04 20:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <LbdoDpd--3-1@tutanota.com-LbdrIe9----1>
2019-04-04 20:36 ` znavko [this message]
     [not found] ` <Lbe0PNU--3-1@tutanota.com-Lbe3LhE----1>
2019-04-05  9:41   ` wpa-supplicant service configuration. Guile is hard znavko
2019-04-05 16:38     ` Ricardo Wurmus
2019-04-06  8:54     ` znavko
2019-04-06  8:57     ` znavko
2019-04-06 17:55     ` znavko
2019-04-05 13:49   ` jbranso
2019-04-05 14:34     ` znavko
2019-04-04 19:26 znavko
2019-04-04 20:01 ` Quiliro Ordonez
2019-04-05 16:47 ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Lbe0PNU--3-1@tutanota.com \
    --to=znavko@tutanota.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).