help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

G-Expressions manual. change user shell in guix config.scm


From: znavko
Subject: G-Expressions manual. change user shell in guix config.scm
Date: Fri, 03 May 2019 15:36:27 +0000

I want to try to use G-expressions to change 'mom' user shell to dash.
I have this error:

# guix system reconfigure config-znavko.scm
...
building 
/gnu/store/zhmd8fr5v86wnaf6apcz4281c008fjv5-shepherd-user-homes.scm.drv...
building /gnu/store/6wnbkfdqy3qmbcjz00d1w5p8mw1rkyaa-shells.drv...
/builder for `/gnu/store/6wnbkfdqy3qmbcjz00d1w5p8mw1rkyaa-shells.drv' failed 
with exit code 1
build of /gnu/store/6wnbkfdqy3qmbcjz00d1w5p8mw1rkyaa-shells.drv failed
View build log at 
'/var/log/guix/drvs/6w/nbkfdqy3qmbcjz00d1w5p8mw1rkyaa-shells.drv.bz2'.
cannot build derivation `/gnu/store/36ah9x5q8nj6y01fs32brcndmkgyvqmv-etc.drv': 
1 dependencies couldn't be built
building /gnu/store/kvdsb795wn1ic8p9kcdsbkd9vw5v4dm2-shepherd.conf.drv...
cannot build derivation 
`/gnu/store/cmfly4pn3hs2y38km0l3yn3phkxy84xj-system.drv': 1 dependencies 
couldn't be built
guix system: error: build of 
`/gnu/store/cmfly4pn3hs2y38km0l3yn3phkxy84xj-system.drv' failed

# tail -n1 /var/log/guix/drvs/6w/nbkfdqy3qmbcjz00d1w5p8mw1rkyaa-shells.drv
ERROR: Wrong type to apply: 
"/gnu/store/bqmib4vf9mr8dkqx4dqpcqrnb93giwci-dash-0.5.10.2"
it is here:
(user-account (name "mom") (group "users")
(supplementary-groups '("wheel" "netdev" "audio" "video"))
(home-directory "/home/mom")
(shell #~(#$dash)))
I read Guix Refernce Manual 'G-Expressions' section, but there types described 
quite a little: Scheme Syntax: #~exp  Scheme Syntax: (gexp exp)   

        Return a G-expression containing exp. exp may contain one or more of 
the following forms:  #$obj (ungexp obj)  

        Introduce a reference to obj. obj may have one of the supported types, 
for example a package or a derivation, in which case the ungexp form is 
replaced by its output file name—e.g., "/gnu/store/…-coreutils-8.22. 

        If obj is a list, it is traversed and references to supported objects 
are substituted similarly. 

        If obj is another gexp, its contents are inserted and its dependencies 
are added to those of the containing gexp. 

        If obj is another kind of object, it is inserted as is.     
My wrong config is attached.

But I've found on github workable example 
https://github.com/meiyopeng/guix-config/blob/master/meiyo/systems/default.scm

And rewrite config with file-append Scheme procedure. This works:

 (user-account (name "mom") (group "users")
 (supplementary-groups '("wheel" "netdev" "audio" "video"))
 (home-directory "/home/mom")
 (shell (file-append dash "/bin/dash")))

But I am confused, cause I do not know why config works without #~ and #~ but 
only file-append function? Is it still G-Expression (shell (file-append dash 
"/bin/dash"))?

Attachment: config-znavko.scm
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]