unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Original config from a documentation causes an error with keyboard-layout function
@ 2019-05-08  5:00 Adam Mazurkiewicz
  2019-05-08  6:46 ` swedebugia
  2019-05-08  9:01 ` Ricardo Wurmus
  0 siblings, 2 replies; 7+ messages in thread
From: Adam Mazurkiewicz @ 2019-05-08  5:00 UTC (permalink / raw)
  To: help-guix

I am a newbie and I am learning installing Guixsd step by step. I have
surprised that using a config file from a documentation generates the
error. Actually I am not sure if I am doing mistakes or the documentation
is wrong. I used the config file from a site:

https://www.gnu.org/software/guix/manual/en/html_node/Using-the-Configuration-System.html#Using-the-Configuration-System

The config file I used was this

----config.scm-----
(use-modules (gnu) (gnu system nss))
(use-service-modules desktop xorg)
(use-package-modules certs gnome)

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

  ;; Choose US English keyboard layout.  The "altgr-intl"
  ;; variant provides dead keys for accented characters.
  (keyboard-layout (keyboard-layout "us" "altgr-intl"))

  ;; Use the UEFI variant of GRUB with the EFI System
  ;; Partition mounted on /boot/efi.
  (bootloader (bootloader-configuration
                (bootloader grub-efi-bootloader)
                (target "/boot/efi")
                (keyboard-layout keyboard-layout)))

  ;; Specify a mapped device for the encrypted root partition.
  ;; The UUID is that returned by 'cryptsetup luksUUID'.
  (mapped-devices
   (list (mapped-device
          (source (uuid "12345678-1234-1234-1234-123456789abc"))
          (target "my-root")
          (type luks-device-mapping))))

  (file-systems (append
                 (list (file-system
                         (device (file-system-label "my-root"))
                         (mount-point "/")
                         (type "ext4")
                         (dependencies mapped-devices))
                       (file-system
                         (device (uuid "1234-ABCD" 'fat))
                         (mount-point "/boot/efi")
                         (type "vfat")))
                 %base-file-systems))

  (users (cons (user-account
                (name "bob")
                (comment "Alice's brother")
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video")))
               %base-user-accounts))

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

  ;; Add GNOME and Xfce---we can choose at the log-in screen
  ;; by clicking the gear.  Use the "desktop" services, which
  ;; include the X11 log-in service, networking with
  ;; NetworkManager, and more.
  (services (append (list (service gnome-desktop-service-type)
                          (service xfce-desktop-service-type)
                          (set-xorg-configuration
                           (xorg-configuration
                            (keyboard-layout keyboard-layout))))
                    %desktop-services))

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

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?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Original config from a documentation causes an error with keyboard-layout function
  2019-05-08  5:00 Original config from a documentation causes an error with keyboard-layout function Adam Mazurkiewicz
@ 2019-05-08  6:46 ` swedebugia
  2019-05-08  8:02   ` Adam Mazurkiewicz
  2019-05-08  9:01 ` Ricardo Wurmus
  1 sibling, 1 reply; 7+ messages in thread
From: swedebugia @ 2019-05-08  6:46 UTC (permalink / raw)
  To: help-guix

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Original config from a documentation causes an error with keyboard-layout function
  2019-05-08  6:46 ` swedebugia
@ 2019-05-08  8:02   ` Adam Mazurkiewicz
  2019-05-08 12:57     ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Adam Mazurkiewicz @ 2019-05-08  8:02 UTC (permalink / raw)
  To: help-guix

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
enp2s0    Link 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 0000: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 0000: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 <swedebugia@riseup.net> 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
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Original config from a documentation causes an error with keyboard-layout function
  2019-05-08  5:00 Original config from a documentation causes an error with keyboard-layout function Adam Mazurkiewicz
  2019-05-08  6:46 ` swedebugia
@ 2019-05-08  9:01 ` Ricardo Wurmus
  2019-05-08 10:28   ` Adam Mazurkiewicz
  1 sibling, 1 reply; 7+ messages in thread
From: Ricardo Wurmus @ 2019-05-08  9:01 UTC (permalink / raw)
  To: Adam Mazurkiewicz; +Cc: help-guix


Adam Mazurkiewicz <trzczy@gmail.com> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Original config from a documentation causes an error with keyboard-layout function
  2019-05-08  9:01 ` Ricardo Wurmus
@ 2019-05-08 10:28   ` Adam Mazurkiewicz
  0 siblings, 0 replies; 7+ messages in thread
From: Adam Mazurkiewicz @ 2019-05-08 10:28 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

This is installing from usb flash stick, not reconfiguring, so I cannot use
"guix pull". The version I use is this: "
https://ftp.gnu.org/gnu/guix/guix-system-install-1.0.0.x86_64-linux.iso.xz".
It is the latest one, I guess.

śr., 8 maj 2019 o 11:01 Ricardo Wurmus <rekado@elephly.net> napisał(a):

>
> Adam Mazurkiewicz <trzczy@gmail.com> 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
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Original config from a documentation causes an error with keyboard-layout function
  2019-05-08  8:02   ` Adam Mazurkiewicz
@ 2019-05-08 12:57     ` Ludovic Courtès
  2019-05-11  0:32       ` Adam Mazurkiewicz
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2019-05-08 12:57 UTC (permalink / raw)
  To: Adam Mazurkiewicz; +Cc: help-guix

Hi Adam,

Adam Mazurkiewicz <trzczy@gmail.com> 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’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Original config from a documentation causes an error with keyboard-layout function
  2019-05-08 12:57     ` Ludovic Courtès
@ 2019-05-11  0:32       ` Adam Mazurkiewicz
  0 siblings, 0 replies; 7+ messages in thread
From: Adam Mazurkiewicz @ 2019-05-11  0:32 UTC (permalink / raw)
  To: Ludovic Courtès, help-guix

śr., 8 maj 2019 o 14:58 Ludovic Courtès <ludo@gnu.org> napisał(a):
>
> Hi Adam,
>
> Adam Mazurkiewicz <trzczy@gmail.com> 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.
I use the latest version (1.0) of Guixsd so it is strange that the
'guix' command can be outdated.
>
> To fix that, run:
>
>   guix pull
>   hash guix
>   guix system init /mnt/etc/config.scm
These commands helped. Thanks
>
> Which installation image are you using?  The ‘guix’ in the official
1.0
> installation image 1.0 is definitely up-to-date.
>
> Ludo’.
Adam

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-10 19:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-08  5:00 Original config from a documentation causes an error with keyboard-layout function Adam Mazurkiewicz
2019-05-08  6:46 ` swedebugia
2019-05-08  8:02   ` Adam Mazurkiewicz
2019-05-08 12:57     ` Ludovic Courtès
2019-05-11  0:32       ` Adam Mazurkiewicz
2019-05-08  9:01 ` Ricardo Wurmus
2019-05-08 10:28   ` Adam Mazurkiewicz

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).