help-guix
[Top][All Lists]
Advanced

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

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


From: rendaw
Subject: Re: G-Expressions manual. change user shell in guix config.scm
Date: Sat, 4 May 2019 20:06:45 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3

On 5/4/19 7:53 PM, address@hidden wrote:
> For $~#$dash it says unbound variable:
>
> (use-mosules ...
>            (gnu packages shells)
>            (guix gexp)
>            )
> ...
>                               (user-account (name "mom") (group "users")
>                                             (supplementary-groups '("wheel" 
> "netdev" "audio" "video"))
>                                             (home-directory "/home/mom")
>                                             (shell $~#$dash))
>
> # guix system reconfigure config.scm
> /root/config.scm:24:32: error: #{$~#$dash}#: unbound variable
> hint: Did you forget a `use-modules' form?

You have $~#$ but you should have #~#$ instead.  But this is the same as
just having `(shell dash)` which causes the next error:

>
>
> For just a string 'shell dash' compilation is ok, but after user login in 
> terminal it says 'dash is a directry' and does not allow login:
>
>                               (user-account (name "mom") (group "users")
>                                             (supplementary-groups '("wheel" 
> "netdev" "audio" "video"))
>                                             (home-directory "/home/mom")
>                                             (shell dash))
>
> # guix system reconfigure config.scm
> ..ok...
>
> bob $
> bob $ su - mom
> Password: 
> /gnu/store/bqmib4vf9mr8dkqx4dqpcqrnb93giwci-dash-0.5.10.2: 
> /gnu/store/bqmib4vf9mr8dkqx4dqpcqrnb93giwci-dash-0.5.10.2: Is a directory
> bob $

`dash` is a package object which is "lowered" and becomes a string of
the path to the directory:
`/gnu/store/bqmib4vf9mr8dkqx4dqpcqrnb93giwci-dash-0.5.10.2`

`(shell ...)` needs a path to an executable (the shell program), that
is: `/gnu/store/bqmib4vf9mr8dkqx4dqpcqrnb93giwci-dash-0.5.10.2/bin/dash`

Therefore you need the string-append or file-append expressions to add
the final "/bin/dash".  See the examples from my previous email.


Cheers,
rendaw




reply via email to

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