From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: %desktop-services #:select service alsa-service-type - unbound variable Date: Thu, 20 Sep 2018 19:49:58 +0200 Message-ID: <87a7ocxdmh.fsf@ambrevar.xyz> References: <87fty4xj5x.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g335b-0001Cr-8J for help-guix@gnu.org; Thu, 20 Sep 2018 13:50:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g335W-0002wX-86 for help-guix@gnu.org; Thu, 20 Sep 2018 13:50:07 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:59655) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g335V-0002vL-U5 for help-guix@gnu.org; Thu, 20 Sep 2018 13:50:02 -0400 In-reply-to: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: znavko Cc: "help-guix@gnu.org" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > But I dislike NM cause it stores wifi password as it is, but wpa_supplica= nt > saves hash only. See https://wiki.archlinux.org/index.php/NetworkManager#Encrypted_Wi-Fi_passwor= ds if that's an acceptable solution for you. Also note that the passwords are on= ly readable with root access. > But I could not connect to network running `dhclient -v wlp2s0` so I thin= k I do > not know how get wpa-supplicant service to use my config by default. Make sure dhclient is not already running. Check your processes and the services. Multiple instances of dhclient / wpa_supplicant will prevent you from connecting. Regarding wpa_supplicent, actually the Guix service does not load a config = file but rather listens to a D-Bus interface (if I'm not mistaken). I guess you could pass the configuration via D-Bus but I don't know how to do this. If you really want to use wpa_supplicant manually, you can also disable the service wpa-supplicant service and it should work. > As I can understand guix will compile entire system with such config.scm = from > sources, cause such configuration is not presented in GuixSD servers, am I > right? No, it will only compile the outputs (e.g. packages) for which no substitut= e was found on the server, assuming you have enabled substitutes. Running `guix system reconfigure` will only build/install outputs if they a= re missing from the store. A config.scm involves a collection of outputs and = if they are all available already, nothing will be built. This is why when running `guix system reconfigure` twice in a row, the seco= nd run should not take more than a couple of seconds. > (services (cons* (xfce-desktop-service) > (remove (lambda (service) > (eq? (service-kind service) network-manager-service-= type)) > %desktop-services) Quick explanation: =2D The Lisp syntax boils down to this: `(FUNCTION ARGUMENTS...)`. The fir= st element between the parentheses is the function name, the other elements = are all the arguments passed to that function. Everything is an expression a= nd expressions can be nested, so `(SQUARE (SQRT 4))` return 4. =2D "services" takes a list of services as argument. =2D To make things simpler here, you could replace "cons*" with "list". =2D The arguments to "cons*" or "list" return a list, so we build a list of services with `(list SERVICE1 SERVICE2 ...)`. =2D `(xfce-desktop-service)` returns just that, the XFCE desktop service. =2D The `remove` function takes two arguments: an anonymous function (i.e. a "lambda") and a list. The anonymous function is a predicate: if true, th= en the element of the list is discarded. You can look at it like a filter. = The lambda here is a function that takes a service and if equal to network-manager-service-type, then it returns true (the result of the `eq= ?` function), thus the service is discarded. =2D `remove` is called on %desktop-services with a predicate that matches network-manager-service-type: the result is a list stripped from network-manager-service-type. Hope that helps, let me know if there is anything else to clarify. > I tried 2 Scheme compilers: MIT-Scheme and Chicken Note that Guix uses Guile, so that's probably the Scheme you want to use he= re!=C2=A0:) If you want to learn Scheme, there are many books out there. If TSPL is not to your taste, consider: =2D The Little Schemer: Haven't read it, but I heard it's a gentle introduc= tion. =2D Structure and Interpretation of Computer Programs: a bit more academic,= but it comes with a bunch of videos (https://www.youtube.com/watch?v=3D2Op3QLzMgSY&list=3DPLE18841CABEA24090) a= nd it's also available in Texinfo format -- checkout the SICP Guix package. Hope that helps! =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAluj3cYACgkQm9z0l6S7 zH+tcwf/TS1dHOCceXfmlLCWz8TP8HmMiM2Xn7JShd/YxKX2dg2gZvZzFGUcnD67 my7g7PTVVuc4rh/tCHlqEnOSFs+KIW9WO53hNw/90RXLDCkkx0OYm4u/291ssHqo m+iVLW0m5TWOP/h7jM1JPbRVc6RJhEOmwoJz1dYI87ItOQ3OY1u0FbZWZG9kNZiD Q2ruhxpBzykuAE5AfVa0pLNw2AnS8Taq/30QFu1sWNe/HIsTbE46VDeUcQUpw11W jWjsowMxRcOMLYjPkEjgiqy6sni6CjFwYvUcmnU8im1lmp+ISVabkmjSDR0c9ZJS D+5SeFLfjuxdFl/tmbQCvYStL69GeA== =8kvX -----END PGP SIGNATURE----- --=-=-=--