all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <mail@ambrevar.xyz>
To: znavko <znavko@protonmail.com>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re: %desktop-services #:select service alsa-service-type - unbound variable
Date: Thu, 20 Sep 2018 19:49:58 +0200	[thread overview]
Message-ID: <87a7ocxdmh.fsf@ambrevar.xyz> (raw)
In-Reply-To: <VTldzIDwGKBE7udGdX2RGl55teQ8gxoOLbV-2SpLpQJPzPHXSRX2HYG_vgwN0XEKeTYCC9v071XmxJO8IE2vHt0aqbxuT3aaMZ16_k08bBw=@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 3860 bytes --]


> But I dislike NM cause it stores wifi password as it is, but wpa_supplicant
> saves hash only.

See
https://wiki.archlinux.org/index.php/NetworkManager#Encrypted_Wi-Fi_passwords if
that's an acceptable solution for you.  Also note that the passwords are only
readable with root access.

> But I could not connect to network running `dhclient -v wlp2s0` so I think 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 substitute was
found on the server, assuming you have enabled substitutes.

Running `guix system reconfigure` will only build/install outputs if they are
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 second
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:

- The Lisp syntax boils down to this: `(FUNCTION ARGUMENTS...)`.  The first
  element between the parentheses is the function name, the other elements are
  all the arguments passed to that function.  Everything is an expression and
  expressions can be nested, so `(SQUARE (SQRT 4))` return 4.

- "services" takes a list of services as argument.

- To make things simpler here, you could replace "cons*" with "list".

- The arguments to "cons*" or "list" return a list, so we build a list of
services with `(list SERVICE1 SERVICE2 ...)`.

- `(xfce-desktop-service)` returns just that, the XFCE desktop service.

- The `remove` function takes two arguments: an anonymous function (i.e. a
  "lambda") and a list.  The anonymous function is a predicate: if true, then
  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.

- `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 here! :)

If you want to learn Scheme, there are many books out there.
If TSPL is not to your taste, consider:

- The Little Schemer: Haven't read it, but I heard it's a gentle introduction.

- Structure and Interpretation of Computer Programs: a bit more academic, but it
comes with a bunch of videos
(https://www.youtube.com/watch?v=2Op3QLzMgSY&list=PLE18841CABEA24090) and it's
also available in Texinfo format -- checkout the SICP Guix package.

Hope that helps!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

      reply	other threads:[~2018-09-20 17:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20 14:31 %desktop-services #:select service alsa-service-type - unbound variable znavko
2018-09-20 15:50 ` Pierre Neidhardt
2018-09-20 17:07   ` znavko
2018-09-20 17:29   ` znavko
2018-09-20 17:49     ` Pierre Neidhardt [this message]

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

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

  git send-email \
    --in-reply-to=87a7ocxdmh.fsf@ambrevar.xyz \
    --to=mail@ambrevar.xyz \
    --cc=help-guix@gnu.org \
    --cc=znavko@protonmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.