Wrong type argument in position 1 (expecting struct): #

2019-05-08 Thread znavko
Hello! I try to reconfigure system with Gnome, sddm and wayland.
I also use sddm-configuration to define use wayland for greeter, but get the 
error for my misconfiguration:

# cat config.scm
...
 (services (cons*
 ;(service xfce-desktop-service-type)
 (service gnome-desktop-service-type)
 (service dhcp-client-service-type)
 (service sddm-service
 (sddm-configuration
 (display-server "wayland")))
...
)

# guix system reconfigure config.scm
Backtrace:
 14 (primitive-load "/root/.config/guix/current/bin/guix")
In guix/ui.scm:
 1734:12 13 (run-guix-command _ . _)
In ice-9/boot-9.scm:
 829:9 12 (catch _ _ # …)
 829:9 11 (catch _ _ # …)
In guix/scripts/system.scm:
 1301:8 10 (_)
In guix/status.scm:
 768:4 9 (call-with-status-report _ _)
In guix/scripts/system.scm:
 1159:4 8 (process-action _ _ _)
In guix/store.scm:
 623:10 7 (call-with-store _)
 1794:24 6 (run-with-store _ _ #:guile-for-build _ #:system _ # _)
In guix/scripts/system.scm:
 1175:13 5 (_ _)
 882:18 4 (perform-action reconfigure #< kerne…> …)
In gnu/system.scm:
 851:19 3 (operating-system-derivation _)
In gnu/services.scm:
 743:6 2 (instantiate-missing-services _)
In guix/combinators.scm:
 45:26 1 (fold2 # …)
In gnu/services.scm:
 733:11 0 (adjust-service-list _ (#< type: # …) …)

gnu/services.scm:733:11: In procedure adjust-service-list:
In procedure struct_vtable: Wrong type argument in position 1 (expecting 
struct): #
Please, let me know how to understand such errors. Here, I saw the same 
structure 
https://www.gnu.org/software/guix/manual/en/guix.html#index-sddm_002dservice


config-znavko-gnome.scm
Description: Binary data


Re: Should %base-services be included by default in the OS configuration generated by the installer?

2019-05-08 Thread sirgazil
Hi Tim,

 On Wed, 08 May 2019 19:35:45 -0500 Timothy Sample  
wrote 

 > Hi sirgazil, 
 >  
 > sirgazil  writes: 
 >  
 > > Hi, 
 > > 
 > > The Guix System 1.0.0 installer has a bug that makes it generate 
 > > operating system configuration files that don't include the 
 > > %base-packages 
 > > (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35541). The 
 > > configuration file of the system I installed was initially generated 
 > > by the installer, so I had to add the base packages by hand. Now, I'm 
 > > reading the Services section in the manual and I see that there is a 
 > > %base-services variable. My configuration file does not include 
 > > this. Should one expect the configuration file generated by the 
 > > installer to include these services too? 
 >  
 > Does your configuration have “%desktop-services” instead?  The 
 > “%desktop-services” list includes everything from “%base-services”. 

Yes, %desktop-services is there. So I guess it's fine.

I still have no working CD/DVD 
(https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35584) and bluetooth, so I 
thought maybe not having “%base-services” had something to do with that.

Thanks for your help :)




Re: Any questions yet

2019-05-08 Thread Timothy Sample
Hi Jone,

Jone  writes:

> Hello, people! I don't even know exactly what I would like to ask))
> Well, for example: two calls "guix pull" as root and as user - what
> does the first if the root has 0 packages (besides guix itself,
> right?) But how is this related in the future? I still do not
> understand what I do not understand))

I guess I don’t know exactly what I’m answering, then, but I’ll do my
best!  :)

Running “guix pull” updates Guix the program which also means updating
the list of package definitions.  It does not affect your current
packages – only Guix itself.  This means that it does not matter if you
have 0 packages or 100.

Technically speaking, you usually have (at least) two profiles per user.
One is the “user” profile, and it contains all of the packages you’ve
added either using “guix install” or through a manifest.  The other is
profile that “guix pull” uses.  It only includes a special up-to-date
Guix packages (with all of its dependencies).  Usually, the “user”
profile is linked to from “~/.guix-profile”, and the “guix pull” profile
is linked to from “~/.configure/guix/current”.

If you really want to understand these profiles, the manual is your best
bet.  For the “user” profile, see “(guix) Invoking guix package”.  For
the “guix pull” profile, see “(guix) Invoking guix pull”.  Here are
links to these sections on the Web:







> I know Scheme/Guile only at the level of a ordinary user, so I ask
> such stupid questions, sorry. And English is so-so)) But I love
> freedom! Thanks.
>
> Yes, and also: I wrote a couple of package definitions for several
> XFCE plugins that are not in the repositories. Is it impossible to
> send somewhere? True, the versions is old..

It is possible!  You should update them first, if you can.  Then, you
can send them to us as patches via email.  It may take some time, but
eventually a friendly reviewer will look at your patches, maybe provide
some suggestions on how to improve them, and finally apply them to Guix.
Again, the Guix manual has a good guide to everything you need to know
to do this.  See “(guix) Contributing”, which is on the Web at the
following address:




Particularly, check out the last section called “Submitting Patches”.

Hope that helps!


-- Tim



Re: guix system reconfigure /etc/config.scm or my-config.scm

2019-05-08 Thread sirgazil
 On Wed, 08 May 2019 14:18:33 -0500 Tobias Geerinckx-Rice  
wrote 

 > Hiya Sirgazil, 
 >  
 > sirgazil wrote: 
 > > So, should one do the following instead? 
 > > 
 > > $ emacs ~/path/to/my-config.scm 
 > > Modify the file to your liking 
 > > $ guix pull && sudo guix system reconfigure 
 > > ~/path/to/my-config.scm 
 >  
 > Oh, it doesn't matter. 
 >  
 > This file can be whatever and wherever you want it to be (mine's 
 > /etc/guix/system.scm because eww ‘config’).  It's in /etc by 
 > default since that's where most people will expect it and it's the 
 > Unixly-correct place to put system-wide configuration files, and 
 > this is the mother of all system-wide configuration files :-) 
 >  
 > Now, to be blunt, I don't think 
 >  
 >  “The normal way to change the system configuration is by 
 >  updating this 
 >  file and re-running ‘guix system reconfigure’.  One should 
 >  never have 
 >  to touch files in ‘/etc’[.]” 
 >  
 > can reasonably be read as self-contradictory, but if you want to 
 > add an ‘other’ at the end I don't think anyone will object! 

Thanks for your help, Tobias :)




Re: guix system reconfigure /etc/config.scm or my-config.scm

2019-05-08 Thread sirgazil
 On Wed, 08 May 2019 14:16:55 -0500 John Soo  wrote 

 > Hi there, 
 >  
 > I do exactly what you said: 
 >  
 > $ emacs /path/to/my/config.scm 
 > $ sudo suix system reconfigure /path/to/my/config.scm 
 >  
 > No need to keep it in /etc. 
 >  
 > Hope that helps, 

Yes, thanks :)




Re: Should %base-services be included by default in the OS configuration generated by the installer?

2019-05-08 Thread Timothy Sample
Hi sirgazil,

sirgazil  writes:

> Hi,
>
> The Guix System 1.0.0 installer has a bug that makes it generate
> operating system configuration files that don't include the
> %base-packages
> (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35541). The
> configuration file of the system I installed was initially generated
> by the installer, so I had to add the base packages by hand. Now, I'm
> reading the Services section in the manual and I see that there is a
> %base-services variable. My configuration file does not include
> this. Should one expect the configuration file generated by the
> installer to include these services too?

Does your configuration have “%desktop-services” instead?  The
“%desktop-services” list includes everything from “%base-services”.


-- Tim



Any questions yet

2019-05-08 Thread Jone
Hello, people! I don't even know exactly what I would like to ask))
Well, for example: two calls "guix pull" as root and as user - what
does the first if the root has 0 packages (besides guix itself,
right?) But how is this related in the future? I still do not
understand what I do not understand))

I know Scheme/Guile only at the level of a ordinary user, so I ask
such stupid questions, sorry. And English is so-so)) But I love
freedom! Thanks.

Yes, and also: I wrote a couple of package definitions for several
XFCE plugins that are not in the repositories. Is it impossible to
send somewhere? True, the versions is old..



Should %base-services be included by default in the OS configuration generated by the installer?

2019-05-08 Thread sirgazil
Hi,

The Guix System 1.0.0 installer has a bug that makes it generate operating 
system configuration files that don't include the %base-packages 
(https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35541). The configuration file 
of the system I installed was initially generated by the installer, so I had to 
add the base packages by hand. Now, I'm reading the Services section in the 
manual and I see that there is a %base-services variable. My configuration file 
does not include this. Should one expect the configuration file generated by 
the installer to include these services too?

Thanks,


---
https://sirgazil.bitbucket.io/







Guix cookbook (was: guile scheme tutorial)

2019-05-08 Thread Ricardo Wurmus


Pierre Neidhardt  writes:

> A well written manual might not be the only answer we are looking for.  How
> do we teach complex concepts in schools?  With examples and exercises.
> Maybe we should do that.  Blog articles could be a good fit.

I’m not a fan of blog posts for teaching, because they quickly lose
relevance.  An example: recently someone on IRC said they were following
your packaging tutorial and something wasn’t working; someone else then
said that the blog post was outdated.  I don’t recall the details, but I
find this worrying, because people might spend time learning something
from blog posts only to have to unlearn things again.

Blog posts are great for outreach and to spawn contemporary discussions.
But I think that ultimately we should enhance the manual.  We are not
limited to having just one document that needs to meet all
requirements.  We can have more than one thing.

Previously, we floated the idea of having a Guix cookbook with short
tutorials showing how to achieve well-defined tasks such as writing a
package (i.e. an updated and distilled version of your blog post
perhaps), setting up a bluetooth-enabled MPD-powered media workstation,
configuring a complex web application with database, web server, etc.

I’d really like to see such a cookbook become part of Guix.  It would
always be up-to-date and it can provide much needed examples that might
otherwise clutter up the manual.

What do you think?  Shall we start with converting your packaging
tutorial?

--
Ricardo




Re: guix system reconfigure /etc/config.scm or my-config.scm

2019-05-08 Thread Tobias Geerinckx-Rice

Hiya Sirgazil,

sirgazil wrote:

So, should one do the following instead?

$ emacs ~/path/to/my-config.scm
Modify the file to your liking
$ guix pull && sudo guix system reconfigure 
~/path/to/my-config.scm


Oh, it doesn't matter.

This file can be whatever and wherever you want it to be (mine's 
/etc/guix/system.scm because eww ‘config’).  It's in /etc by 
default since that's where most people will expect it and it's the 
Unixly-correct place to put system-wide configuration files, and 
this is the mother of all system-wide configuration files :-)


Now, to be blunt, I don't think

 “The normal way to change the system configuration is by 
 updating this
  file and re-running ‘guix system reconfigure’.  One should 
  never have

  to touch files in ‘/etc’[.]”

can reasonably be read as self-contradictory, but if you want to 
add an ‘other’ at the end I don't think anyone will object!


Kind regards,

T G-R


signature.asc
Description: PGP signature


Re: guix system reconfigure /etc/config.scm or my-config.scm

2019-05-08 Thread John Soo
Hi there,

I do exactly what you said:

$ emacs /path/to/my/config.scm
$ sudo suix system reconfigure /path/to/my/config.scm

No need to keep it in /etc. 

Hope that helps,

John

> On May 8, 2019, at 11:54 AM, sirgazil  wrote:
> 
> Hi,
> 
> I'm reading the Guix manual, and I'm confused about the recommended way to 
> reconfigure the system.
> 
> The workaround added recently to the "Graphical Installation" section 
> suggests that in a freshly installed system you can:¹
> 
>$ sudo emacs /etc/config.scm
>Modify the file to your liking
>$ guix pull && sudo guix system reconfigure /etc/config.scm
> 
> But the "System Configuration" section seems to recommend against touching 
> files in "/etc". The "Instantiating the System" subsection talks about 
> running ²
> 
>$ guix system reconfigure my-system-config.scm
> 
> This subsection also reads:
> 
>The normal way to change the system configuration is by updating this
>file and re-running ‘guix system reconfigure’.  One should never have to
>touch files in ‘/etc’ or to run commands that modify the system state
>such as ‘useradd’ or ‘grub-install’.  In fact, you must avoid that since
>that would not only void your warranty but also prevent you from rolling
>back to previous versions of your system, should you ever need to.
> 
> So, should one do the following instead?
> 
>$ emacs ~/path/to/my-config.scm
>Modify the file to your liking
>$ guix pull && sudo guix system reconfigure ~/path/to/my-config.scm
> 
> 
> 
> Footnotes:
> 
> 1. 
> https://www.gnu.org/software/guix/manual/en/html_node/Guided-Graphical-Installation.html#Guided-Graphical-Installation
> 2. 
> https://www.gnu.org/software/guix/manual/en/html_node/Using-the-Configuration-System.html#Instantiating-the-System
> 
> 
> ---
> https://sirgazil.bitbucket.io/
> 
> 
> 
> 
> 



guix system reconfigure /etc/config.scm or my-config.scm

2019-05-08 Thread sirgazil
Hi,

I'm reading the Guix manual, and I'm confused about the recommended way to 
reconfigure the system.

The workaround added recently to the "Graphical Installation" section suggests 
that in a freshly installed system you can:¹

$ sudo emacs /etc/config.scm
Modify the file to your liking
$ guix pull && sudo guix system reconfigure /etc/config.scm

But the "System Configuration" section seems to recommend against touching 
files in "/etc". The "Instantiating the System" subsection talks about running ²

$ guix system reconfigure my-system-config.scm

This subsection also reads:

The normal way to change the system configuration is by updating this
file and re-running ‘guix system reconfigure’.  One should never have to
touch files in ‘/etc’ or to run commands that modify the system state
such as ‘useradd’ or ‘grub-install’.  In fact, you must avoid that since
that would not only void your warranty but also prevent you from rolling
back to previous versions of your system, should you ever need to.

So, should one do the following instead?

$ emacs ~/path/to/my-config.scm
Modify the file to your liking
$ guix pull && sudo guix system reconfigure ~/path/to/my-config.scm



Footnotes:

1. 
https://www.gnu.org/software/guix/manual/en/html_node/Guided-Graphical-Installation.html#Guided-Graphical-Installation
2. 
https://www.gnu.org/software/guix/manual/en/html_node/Using-the-Configuration-System.html#Instantiating-the-System


---
https://sirgazil.bitbucket.io/







Re: Input Attach Service

2019-05-08 Thread Tobias Geerinckx-Rice

Raghav,

Raghav Gururajan wrote:

Hello Guix!

Based on this 
(https://www.gnu.org/software/guix/manual/en/html_node/Miscellaneous-Services.html#Miscellaneous-Services), 
I have included "input-attach-service-type" (with default 
config, that is, values left blank) to my system services in the 
system config. But still my stylus input is not detected.


This is probably just a typo in your e-mail, but the service is 
name inputattach-service-type (no third hyphen).


My device is RYF-Certified TET-X200T 
(https://tehnoetic.com/tet-x200t).


When I checked "herd status" as root, the inputattach service 
was not running. Also, during the system boot, I noticed an 
output line "inputattach: can't set device type".


I don't own an X200T, and I don't know which guide your following, 
but a random search led me here[0].  They use ‘--w8001’ while our 
service defaults to ‘--wacom’.


Does passing ‘(type "w8001")’ to inputattach-configuration change 
a thing?


Kind regards,

T G-R

[0]: 
http://www.thinkwiki.org/wiki/Wacom_Serial_Tablet_PC_Stylus#ThinkPad_X200_Tablet_Pen_and_Touch


signature.asc
Description: PGP signature


Input Attach Service

2019-05-08 Thread Raghav Gururajan
Hello Guix!

Based on this 
(https://www.gnu.org/software/guix/manual/en/html_node/Miscellaneous-Services.html#Miscellaneous-Services),
 I have included "input-attach-service-type" (with default config, that is, 
values left blank) to my system services in the system config. But still my 
stylus input is not detected.

My device is RYF-Certified TET-X200T (https://tehnoetic.com/tet-x200t).

When I checked "herd status" as root, the inputattach service was not running. 
Also, during the system boot, I noticed an output line "inputattach: can't set 
device type".

What should I do to overcome this issue?

NOTE TO MARK H.W: Sorry that I couldn't catch up with our previous discussion 
regarding stylus input. It appears this new service type could be a good fix.

Thank you!

Regards,
RG.


Re: guile scheme tutorial

2019-05-08 Thread swedebugia
On 2019-05-08 15:15, Pierre Neidhardt wrote:
> For what it's worth, most of rendaw's comments resonate to me, from back
> when I first got started with Guix.
> 
> But now, with hindsight, it's not obvious to me anymore what can be
> fixed in the manual.
> 
> I believe the reason for this is simply that Guix and all its
> concepts are a lot to take for newcomers, it's simply too hard to digest
> even after multiple readings.  It takes time and practice.
> 
> A well written manual might not be the only answer we are looking for.  How
> do we teach complex concepts in schools?  With examples and exercises.
> Maybe we should do that.  Blog articles could be a good fit.

+1

-- 
Cheers Swedebugia



signature.asc
Description: OpenPGP digital signature


Re: Adding Services

2019-05-08 Thread John Soo
Hi Amar,

I recommend reading the manual sections on service definitions. I think that 
will clear up any confusion. For this configuration there are two suggestions I 
have:

  - closely check the way the `service` procedure is used. It takes the service 
type and a configuration like below. It is not valid to apply the type to the 
configuration.

(service oddmuse-service-type
  (oddmuse-configuration ...))

  - The configuration need not use `inherit` if you intend to take the 
defaults. The record type’s defaults will be used already when using the 
construction procedure. The configuration would look like this:

(oddmuse-configuration
  (root “blah”)
   ...)

Hope that helps.

- John

> On May 7, 2019, at 11:23 PM, nly  wrote:
> 
> 
> I imagine a user(me) would do:
> 
> (service (oddmuse-service-type
>  (oddmuse-configuration
>   (inherit %oddmuse-configuration)
>   (root "blah")
>   (...
> 
> Is this alright? Oddmuse package is in (gnu packages web)
> I am missing the service extensions, (i don't get what i need to put in
> there)
> 
> Thanks
> Amar
> 
> <0001-gnu-Add-oddmuse-service-type.patch>



How to use gexps in builds?

2019-05-08 Thread nly


...
(build-system trivial-build-system)
`(#:modules ((guix gexp))
 #:builder
 (gexp->derivation "gnumake"
   #~(begin
   (mkdir #$output)
   (chdir #$output)
   (symlink #$gnu-make #$output)))
 ))
...

The above form looks like it asks for too many (use-modules ...) (6 or
even more). What am I missing?



Re: Original config from a documentation causes an error with keyboard-layout function

2019-05-08 Thread Ludovic Courtès
Hi Adam,

Adam Mazurkiewicz  skribis:

> root@gnu ~# guix system init /mnt/etc/config.scm /mnt/
> /mnt/etc/config.scm:5:0: error: extraneous field initializers
> (keyboard-layout)
> root@gnu ~# guix describe
> guix describe: error: failed to determine origin

Most likely this means that the ‘guix’ command is outdated.

To fix that, run:

  guix pull
  hash guix
  guix system init /mnt/etc/config.scm

Which installation image are you using?  The ‘guix’ in the official
installation image 1.0 is definitely up-to-date.

Ludo’.



Re: Adding a polkit-service to fix networkmanager

2019-05-08 Thread Ludovic Courtès
Hello,

Adam Mazurkiewicz  skribis:

> I installed networkmanager in my Xfce Desktop Environment, but it did
> not allow to add new connections.

What application do you use to manage NetworkManager connectivity?  (The
‘network-manager’ package provides core ‘network-manager’, but on GNOME
for instance the graphical application is ‘network-manager-applet’.)

>   ;; This is where we specify system-wide packages.
>   (packages (cons* icecat

As a side note, I would recommend keeping application in your user
profile rather than globally installed.  That provides more flexibility.

Thanks,
Ludo’.



Adding Services

2019-05-08 Thread nly

I imagine a user(me) would do:

(service (oddmuse-service-type
  (oddmuse-configuration
   (inherit %oddmuse-configuration)
   (root "blah")
   (...

Is this alright? Oddmuse package is in (gnu packages web)
I am missing the service extensions, (i don't get what i need to put in
there)

Thanks
Amar

>From 3af150b5220fc40407c2e63eab1019afef303844 Mon Sep 17 00:00:00 2001
From: Amar Singh 
Date: Sun, 5 May 2019 04:15:13 +0530
Subject: [PATCH] gnu: Add oddmuse-service-type.

* gnu/services/oddmuse.scm (oddmuse-service-type): New variable.
---
 gnu/services/oddmuse.scm | 86 
 1 file changed, 86 insertions(+)
 create mode 100644 gnu/services/oddmuse.scm

diff --git a/gnu/services/oddmuse.scm b/gnu/services/oddmuse.scm
new file mode 100644
index 00..881d795e60
--- /dev/null
+++ b/gnu/services/oddmuse.scm
@@ -0,0 +1,86 @@
+;;; GNU Guix --- Functional package management for GNU
+;;;
+;;; Copyright (C) 2019 by Amar Singh 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (gnu services oddmuse))
+(use-modules
+ (srfi srfi-1)
+ (guix packages)
+ (gnu packages web)
+ (gnu services)
+ (gnu services web)
+ (gnu services configuration)
+ )
+
+(define (oddmuse-activation config)
+  #t)
+
+(define nginx-server-configuration-list?
+  (@@ (gnu services cgit) nginx-server-configuration-list?))
+
+(define serialize-nginx-server-configuration-list
+  (@@ (gnu services cgit) serialize-nginx-server-configuration-list))
+
+(define-configuration oddmuse-configuration
+  (package
+   (package oddmuse)
+   "The oddmuse package.")
+  (nginx
+   (nginx-server-configuration-list
+(list %oddmuse-configuration-nginx))
+   "Nginx server config"))
+
+(define-public oddmuse-service-type
+  (service-type
+   (name 'oddmuse)
+   (extensions
+(list
+ ;; (service-extension activation-service-type
+ ;; oddmuse-activation)
+  (service-extension nginx-service-type
+ oddmuse-configuration-ngnix)
+  (service-extension fcgiwrap-service-type
+ (const #t
+   (default-value (oddmuse-configuration))
+   (description
+"Run the oddmuse web wiki.")))
+
+(define %oddmuse-configuration-nginx
+  (nginx-server-configuration
+   (root "/srv/wiki")
+   (listen '("80"))
+   (server-name "localhost")
+   (locations
+(list
+ (nginx-location-configuration
+  (uri "~ ^/wiki/index\\.cgi/.*$")
+  (body '(
+  "rewrite ^/wiki/index\\.cgi.*/(.*$) /wiki/index.cgi?$1 permanent;"  )))
+ (nginx-location-configuration
+  (uri "~ \\.cgi")
+  (body '(
+  "fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;"
+  "include /etc/nginx/fastcgi_params;"
+  "fastcgi_index index.cgi;"
+  "fastcgi_pass fcgiwrap;"
+  )
+   (try-files (list "$uri" "@oddmuse"))
+   (ssl-certificate #f)
+   (ssl-certificate-key #f)))
+
+;;; oddmuse.scm ends here
-- 
2.21.0



Re: guile scheme tutorial

2019-05-08 Thread Ludovic Courtès
Hello!

rendaw <7e9wc56emja...@s.rendaw.me> skribis:

> The areas that were important for me but weren't well documented were:

Thanks for explaining!  That’s a lot of things to digest.  :-)

I’m not entirely sure I agree with or understand everything you mention,
I’ll comment on some of these below.  However, I think you should really
propose incremental improvements to the manual in these areas; it’ll be
easier to discuss specific sections or paragraphs.

> 1. Concepts
>
> * What is functional package management?  What is garbage collection? 
> How do these work?

“(guix) Managing Software the Guix Way” has a paragraph about functional
package management, but that’s (purposefully) the only place where FPM
is discussed.

> What is a package?  How does Guix determine what makes a package
> unique?  What's a derivation, and what's the relationship between
> derivations and packages?  The best I could find is that a derivation
> communicates an action to the store, but that uses vocabulary in ways
> that 99% of readers won't be familiar with ("communicate", "action",
> isn't the "store" a directory?) and is so abstract that it won't help
> people make choices dependent on that.  What's a tangible example of a
> derivation?  Where and why would someone use a derivation directly?

“(guix) Defining Packages” explains:

 Behind the scenes, a derivation corresponding to the ‘’
  object is first computed by the ‘package-derivation’ procedure.  That
  derivation is stored in a ‘.drv’ file under ‘/gnu/store’.  The build
  actions it prescribes may then be realized by using the
  ‘build-derivations’ procedure (*note The Store::).

… with cross-references.

> The only gc documentation says that anything reachable from a root won't
> be deleted, but doesn't explain what a root is, how they're created, how
> they're identified, how they're removed, etc.

“(guix) Invoking guix gc” has a paragraph that I think explains what a
GC root is:

 The garbage collector has a set of known “roots”: any file under
  ‘/gnu/store’ reachable from a root is considered “live” and cannot be
  deleted; any other file is considered “dead” and may be deleted.  The
  set of garbage collector roots (“GC roots” for short) includes default
  user profiles; by default, the symlinks under ‘/var/guix/gcroots’
  represent these GC roots.  New GC roots can be added with ‘guix build
  --root’, for example (*note Invoking guix build::).  The ‘guix gc
  --list-roots’ command lists them.

> * What happens when running guix system?

How does “(guix) Using the Configuration System” fall short here?

> What does guix system do with the definition once it's returned?  How
> does install happen on a live system?  What stages are there in the install?
>
> How does this process change for the different install targets? (vm,
> disk-image, docker image, etc)

Likewise, how does “(guix) Invoking guix system” fail to explain this?

> * G-expressions
>
> The analogy to quotes is useful, but how do these actually work? 
> They're relocatable - how does one store them to disk?  Read them from
> disk an execute them?  Or execute them from memory?  Quotes can be
> converted back from data using `eval` - what's the g-expression
> equivalent?  Where can they be used (maybe this is more a reference
> thing - which functions take g-expression arguments)?

I think that “(guix) G-Expressions” answers some of these questions, but
perhaps you could propose a patch to clarify that.

Keep in mind that this section is not about the design and
implementation of G-Expressions—there’s a paper on that topic.  Instead,
the intent is to explain why they exist in the first place, and how they
can be used.

> * Package creation
>
> Again, the documentation says "use these build systems" but not why, or
> what they do.

“(guix) Build Systems” has:

  Each package definition specifies a “build system” and arguments for
  that build system (*note Defining Packages::).  This ‘build-system’
  field represents the build procedure of the package, as well as implicit
  dependencies of that build procedure.

I think that’s an good intro for “what they do”, no?

> IMO it would be better to start with the trivial build system, say "we
> have these files, here's how we turn it into a package" then show how
> the build systems make it much simpler but that they're just an
> extension of first principles.

I’m not sure.  I think as a packager you’re first and foremost
interested in ‘gnu-build-system’, ‘cmake-build-system’, and so on,
because those are the first you’ll use to get things done.
‘trivial-build-system’ is usually advanced usage.

> * Services
>
> I've been discussing this in another thread, but it's the same thing -
> what a service is is unclear because it hinges on the use of the word
> "extend" which isn't defined.

I think it does explain extensions in quite some detail, but Chris
concurs with you that it’s unclear, so I guess there’s room for
improvement.  :-)

In short, I’m 

Re: Original config from a documentation causes an error with keyboard-layout function

2019-05-08 Thread Ricardo Wurmus


Adam Mazurkiewicz  writes:

> Using this file caused the error:
> /root/sda6/home/s/Dropbox/Guix/scm1/config.scm:5:0: error: extraneous field
> initializers (keyboard-layout)
>
> So it is something wrong with the keyboard-layout function. The function is
> used a few times so we do not know which one actually causes the error.

Nothing wrong with the function but with the field of that name.
The field was added only recently, so you need to use a recent version
of Guix for this to work.

What version do you use?  Have you run “guix pull” yet?

-- 
Ricardo




Re: Original config from a documentation causes an error with keyboard-layout function

2019-05-08 Thread Adam Mazurkiewicz
I processed the installation try from usb flash stick. First I formatted a
target partition for the new Guixsd instance with ext4 and labeled it
guixsd. Then I did that follows and put 'guix describe':

root@gnu ~# ifconfig enp2s0 up && \
> dhclient enp2s0 -v
[  173.423231] RTL8211B Gigabit Ethernet r8169-200:00: attached PHY driver
[RTL8211B Gigabit Ethernet] (mii_bus:phy_addr=r8169-200:00, irq=IGNORE)
[  173.524320] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
enp2s0Link encap:Ethernet  HWaddr 00:23:54:60:DA:20
  UP BROADCAST MULTICAST  MTU:1500  Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
[  173.525924] r8169 :02:00.0 enp2s0: Link is Down
  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:0  TX bytes:0

Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/enp2s0/00:23:54:60:da:20
Sending on   LPF/enp2s0/00:23:54:60:da:20
Sending on   Socket/fallback
DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 6
[  175.062429] r8169 :02:00.0 enp2s0: Link is Up - 100Mbps/Full - flow
control off
[  175.062723] IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready
DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 12
DHCPOFFER of 192.168.0.6 from 192.168.0.1
DHCPREQUEST for 192.168.0.6 on enp2s0 to 255.255.255.255 port 67
DHCPACK of 192.168.0.6 from 192.168.0.1
bound to 192.168.0.6 -- renewal in 266 seconds.
root@gnu ~# mount /dev/disk/by-label/guixsd /mnt && \
> mkdir /mnt/etc
[  240.335408] EXT4-fs (sda1): recovery complete
[  240.337345] EXT4-fs (sda1): mounted filesystem with ordered data mode.
Opts: (null)
root@gnu ~# cp /root/sda6/home/s/Dropbox/Guix/scm1/config.scm /mnt/etc/
root@gnu ~# herd start cow-store /mnt
Service cow-store has been started.
root@gnu ~# guix system init /mnt/etc/config.scm /mnt/
/mnt/etc/config.scm:5:0: error: extraneous field initializers
(keyboard-layout)
root@gnu ~# guix describe
guix describe: error: failed to determine origin
root@gnu ~#



śr., 8 maj 2019 o 08:46 swedebugia  napisał(a):

> On 2019-05-08 07:00, Adam Mazurkiewicz wrote:
> ...
>
> >
> > Using this file caused the error:
> > /root/sda6/home/s/Dropbox/Guix/scm1/config.scm:5:0: error: extraneous
> field
> > initializers (keyboard-layout)
> >
> > So it is something wrong with the keyboard-layout function. The function
> is
> > used a few times so we do not know which one actually causes the error.
> >
> > Is this the documentation mistake or I am doing something wrong? How to
> use
> > the function keyboard-layout properly?
> >
>
> Could you add the output of "guix describe"?
> How did you install guix?
>
> --
> Cheers
> Swedebugia
>
>


Re: "System Package" vs "System Service"

2019-05-08 Thread Raghav Gururajan
> I'm sorry to hear that Tor is giving you such trouble. Maybe there is
> some helpful information in one of the files in /var/log? Perhaps dmesg
> has some useful output?

I will check the log and get back to you.
How do I use dmesg? Should I install any package and use any specific command?

> As a last resort, another way you might be able to debug the problem is
> by attempting to manually launch Tor and watch what happens. For
> example, something like this ought to mimic the way it starts:
> 
> sudo -u tor /path/to/tor -f /path/to/torrc
> 
> You'll need to replace /path/to/tor with the path to the Tor executable,
> and you'll need to replace the /path/to/torrc with the path to a file
> containing valid Tor configuration. I think if you make a torrc file
> that contains the following, it should work (I have not tested this):
> 
> User tor
> DataDirectory /var/lib/tor
> PidFile /var/run/tor/tor.pid
> Log notice syslog
> 
> For details on the config file syntax, see "man tor".

Thanks! I will give it a try.



Re: "System Package" vs "System Service"

2019-05-08 Thread Chris Marusich
Hi Raghav,

"Raghav Gururajan"  writes:

> Hello Chris!
>
> Thank you for your email. I have already tried configuring my browser
> to use localhost's tor port as proxy, but getting error "proxy is
> refusing connection". When I check tor service with "herd status", tor
> wasn't running. When I did "herd start tor", I am getting error
> "service tor failed to start".

Just a reminder: Please bottom-post when replying on this list.

I'm sorry to hear that Tor is giving you such trouble.  Maybe there is
some helpful information in one of the files in /var/log?  Perhaps dmesg
has some useful output?

As a last resort, another way you might be able to debug the problem is
by attempting to manually launch Tor and watch what happens.  For
example, something like this ought to mimic the way it starts:

sudo -u tor /path/to/tor -f /path/to/torrc

You'll need to replace /path/to/tor with the path to the Tor executable,
and you'll need to replace the /path/to/torrc with the path to a file
containing valid Tor configuration.  I think if you make a torrc file
that contains the following, it should work (I have not tested this):

  User tor
  DataDirectory /var/lib/tor
  PidFile /var/run/tor/tor.pid
  Log notice syslog

For details on the config file syntax, see "man tor".

-- 
Chris


signature.asc
Description: PGP signature


Re: Red Notebook will not build.

2019-05-08 Thread swedebugia

On 2019-05-07 15:37, Jesse Gibbons wrote:
...



When I look into the file that defines the Browser class I see it tries
to import the "webKit2" package, version 4.0 which is not defined by
guix. Then it defines a subclass of WebKit2.WebView which Python says
is null.

Luckily there is a warning about what it is looking for:

** (journal.py:2637): WARNING **: 07:12:54.144: Failed to load shared library 
'libwebkit2gtk-4.0.so.37' referenced by the typelib: libwebkit2gtk-4.0.so.37: 
cannot open shared object file: No such file or directory

** (journal.py:2637): WARNING **: 07:12:54.144: Failed to load shared library 
'libjavascriptcoregtk-4.0.so.18' referenced by the typelib: 
libjavascriptcoregtk-4.0.so.18: cannot open shared object file: No such file or 
directory

This was the error I had before i updated guix. Both of these shared
libraries are in the environment's $LIBRARY_PATH.


It is quite common that software is hardcoded to expect the libraries in 
certain paths e.g. /usr/lib or whatever. I suggest you substitute the 
path in journal.py to help it find the libraries.


--
Cheers
Swedebugia



Re: Original config from a documentation causes an error with keyboard-layout function

2019-05-08 Thread swedebugia

On 2019-05-08 07:00, Adam Mazurkiewicz wrote:
...



Using this file caused the error:
/root/sda6/home/s/Dropbox/Guix/scm1/config.scm:5:0: error: extraneous field
initializers (keyboard-layout)

So it is something wrong with the keyboard-layout function. The function is
used a few times so we do not know which one actually causes the error.

Is this the documentation mistake or I am doing something wrong? How to use
the function keyboard-layout properly?



Could you add the output of "guix describe"?
How did you install guix?

--
Cheers
Swedebugia