~abcdw/rde-discuss

8 3

Home environment setup

Details
Message ID
<tencent_02B89545FA2A079B2219D6C4E1D96B152407@qq.com>
DKIM signature
pass
Download raw message
Hi, I clone the repository and setup guix channel for rde, when I
already write the home-environment.scm and reconfigure it, guile report
error: mkdir: Permission denied
Where I set wrong?
Details
Message ID
<87a6ovxcx5.fsf@trop.in>
In-Reply-To
<tencent_02B89545FA2A079B2219D6C4E1D96B152407@qq.com> (view parent)
DKIM signature
missing
Download raw message
Hi,

Provide some information about your system. Do you use Guix System or
other distro. What are the commands you issued, what is the full output
of those commands, what is the content of home-environment.scm?
Details
Message ID
<875yzjx763.fsf@trop.in>
In-Reply-To
<87a6ovxcx5.fsf@trop.in> (view parent)
DKIM signature
missing
Download raw message
Please reply to all next time.

> System information:

> Distro: Guix System
> Kernel: Linux libre v5.11.21
> guix describe:
> Generation 1    May 16 2021 12:11:57    (current)
>   rde c8f2982
>     repository URL: https://git.sr.ht/~abcdw/rde
>     branch: master
>     commit: c8f2982281c08ff22243bfca59ba3fdba94c3618
>   guix 7c4c781
>     repository URL: https://mirror.sjtu.edu.cn/git/guix.git
>     branch: master
>     commit: 7c4c781aa40c42d4cd10b8d9482199f3db345e1b

> Command:

> guix home reconfigure ~/.config/guix/home-environment.scm

> Output:

> The following derivations will be built:
>    /gnu/store/8k3rdx838abfis5w0rbyc8kbw0w4cafw-home-environment.drv
>    /gnu/store/3w0r6jd82823rwbcbqwkgm242wf9v394-provenance.drv

> /gnu/store/ky9258nbvgcxcspai45s5hn6ba8wx83j-home-environment
> guix home: error: mkdir: Permission denied

> home-environment.scm content:

> (use-modules (gnu home)
>              (gnu home-services)
>              (gnu home-services shells)
>              (gnu services)
>              (gnu packages tmux))
> (home-environment
>  (home-directory "/home/c4droid")
>  (packages (list tmux))
>  (services
>   (list
>    (service home-bash-service-type
>             (home-bash-configuration
>              (guix-defaults? #t)
>              (bash-profile '("\
> export HISTFILE=$XGD_CACHE_HOME/.bash_history")))))))

guix home build ~/.config/guix/home-environment.scm

Does it work?

I took your configuration and succefully built it, and reconfigured too,
also works. Used the same channels versions as you.

Also, show your `env | grep -E "GUILE|HOME"` or even full `env` output,
make sure not to expose any private info.
Details
Message ID
<tencent_EFD71E48AE2B5BF4660EDF45ECACA2C32408@qq.com>
In-Reply-To
<875yzjx763.fsf@trop.in> (view parent)
DKIM signature
pass
Download raw message
Andrew Tropin writes:

> Please reply to all next time.
>
>> System information:
>
>> Distro: Guix System
>> Kernel: Linux libre v5.11.21
>> guix describe:
>> Generation 1    May 16 2021 12:11:57    (current)
>>   rde c8f2982
>>     repository URL: https://git.sr.ht/~abcdw/rde
>>     branch: master
>>     commit: c8f2982281c08ff22243bfca59ba3fdba94c3618
>>   guix 7c4c781
>>     repository URL: https://mirror.sjtu.edu.cn/git/guix.git
>>     branch: master
>>     commit: 7c4c781aa40c42d4cd10b8d9482199f3db345e1b
>
>> Command:
>
>> guix home reconfigure ~/.config/guix/home-environment.scm
>
>> Output:
>
>> The following derivations will be built:
>>    /gnu/store/8k3rdx838abfis5w0rbyc8kbw0w4cafw-home-environment.drv
>>    /gnu/store/3w0r6jd82823rwbcbqwkgm242wf9v394-provenance.drv
>
>> /gnu/store/ky9258nbvgcxcspai45s5hn6ba8wx83j-home-environment
>> guix home: error: mkdir: Permission denied
>
>> home-environment.scm content:
>
>> (use-modules (gnu home)
>>              (gnu home-services)
>>              (gnu home-services shells)
>>              (gnu services)
>>              (gnu packages tmux))
>> (home-environment
>>  (home-directory "/home/c4droid")
>>  (packages (list tmux))
>>  (services
>>   (list
>>    (service home-bash-service-type
>>             (home-bash-configuration
>>              (guix-defaults? #t)
>>              (bash-profile '("\
>> export HISTFILE=$XGD_CACHE_HOME/.bash_history")))))))
>
> guix home build ~/.config/guix/home-environment.scm
>
> Does it work?
It work, can be built successfully
>
> I took your configuration and succefully built it, and reconfigured too,
> also works. Used the same channels versions as you.
>
> Also, show your `env | grep -E "GUILE|HOME"` or even full `env` output,
> make sure not to expose any private info.
`env | grep -E "GUILE|HOME"` result:

HOME=/home/xxxxxx
GUILE_LOAD_PATH=/run/current-system/profile/share/guile/site/3.0
GUILE_LOAD_COMPILED_PATH=/run/current-system/profile/lib/guile/3.0/site-ccache:/run/current-system/profile/share/guile/site/3.0

But, it's wierd, I install with same system configuration at my VM, and
do the same thing, it work well. (Laugh and cry
Details
Message ID
<871ra6yh4q.fsf@trop.in>
In-Reply-To
<87a6ovxcx5.fsf@trop.in> (view parent)
DKIM signature
missing
Download raw message
>> /gnu/store/ky9258nbvgcxcspai45s5hn6ba8wx83j-home-environment
>> guix home: error: mkdir: Permission denied

Still looks strange, because we don't have mkdir in Guix Home code, and
the only part, which use mkdir and I can recall are functions from (guix
profiles), which we use.

> HOME=/home/xxxxxx

Hope your $HOME is equal to what you have in the configuration file.

> GUILE_LOAD_PATH=/run/current-system/profile/share/guile/site/3.0
> GUILE_LOAD_COMPILED_PATH=/run/current-system/profile/lib/guile/3.0/site-ccache:/run/current-system/profile/share/guile/site/3.0

First reconfigure should be done with GUILE_LOAD_PATH set to:
GUILE_LOAD_PATH=${XDG_CONFIG_HOME:-$HOME/.config}/guix/current/share/guile/site/3.0:$GUILE_LOAD_PATH

Alternatively, you can use Option 1 from README and use ./pre-inst-env.

After relogin/reboot, if your login shell is managed by Guix Home, this
variable will be set automatically.  When Guix Home will become a part
of Guix this step will be unecessary.
Details
Message ID
<tencent_71A25648E97F1C708ACE582B870DAE9F9009@qq.com>
In-Reply-To
<871ra6yh4q.fsf@trop.in> (view parent)
DKIM signature
pass
Download raw message
Andrew Tropin writes:

>>> /gnu/store/ky9258nbvgcxcspai45s5hn6ba8wx83j-home-environment
>>> guix home: error: mkdir: Permission denied
>
> Still looks strange, because we don't have mkdir in Guix Home code, and
> the only part, which use mkdir and I can recall are functions from (guix
> profiles), which we use.
>
>> HOME=/home/xxxxxx
>
> Hope your $HOME is equal to what you have in the configuration file.
>

My home is equal the configuration file definition

>> GUILE_LOAD_PATH=/run/current-system/profile/share/guile/site/3.0
>> GUILE_LOAD_COMPILED_PATH=/run/current-system/profile/lib/guile/3.0/site-ccache:/run/current-system/profile/share/guile/site/3.0
>
> First reconfigure should be done with GUILE_LOAD_PATH set to:
> GUILE_LOAD_PATH=${XDG_CONFIG_HOME:-$HOME/.config}/guix/current/share/guile/site/3.0:$GUILE_LOAD_PATH
>
> Alternatively, you can use Option 1 from README and use ./pre-inst-env.
>
> After relogin/reboot, if your login shell is managed by Guix Home, this
> variable will be set automatically.  When Guix Home will become a part
> of Guix this step will be unecessary.

I was tried this method too, still report the mkdir's permission issue
Details
Message ID
<87mtsuhh0o.fsf@yoctocell.xyz>
In-Reply-To
<tencent_02B89545FA2A079B2219D6C4E1D96B152407@qq.com> (view parent)
DKIM signature
pass
Download raw message
On Sun, May 16 2021, c4droid wrote:

> Hi, I clone the repository and setup guix channel for rde, when I
> already write the home-environment.scm and reconfigure it, guile
> report error: mkdir: Permission denied Where I set wrong?

Maybe you could run ‘guix home build
~/.config/guix/home-environment.scm’ under ‘strace’ to see what
directory it’s trying to create?
Details
Message ID
<tencent_9B49C3FCD78C481F2B2BF47D0E434577AC08@qq.com>
In-Reply-To
<87mtsuhh0o.fsf@yoctocell.xyz> (view parent)
DKIM signature
pass
Download raw message
Xinglu Chen writes:

> On Sun, May 16 2021, c4droid wrote:
>
>> Hi, I clone the repository and setup guix channel for rde, when I
>> already write the home-environment.scm and reconfigure it, guile
>> report error: mkdir: Permission denied Where I set wrong?
>
> Maybe you could run ‘guix home build
> ~/.config/guix/home-environment.scm’ under ‘strace’ to see what
> directory it’s trying to create?

I found why, because my system not enable elogind-service, when I add
elogind-service and reconfigure system, everything is work.
Details
Message ID
<87mtstev6r.fsf@trop.in>
In-Reply-To
<87mtsuhh0o.fsf@yoctocell.xyz> (view parent)
DKIM signature
missing
Download raw message
> I found why, because my system not enable elogind-service, when I add
> elogind-service and reconfigure system, everything is work.

Glad you figured it out, well done!  Yep, Guix Home expects
/run/user/$UID to be present.  Strace log of `guix home reconfigure`
still will be useful to be sure that it's exactly where it fails without
elogind.  But thank you for figuring out the cause of the issue, maybe
later we will make elogind an optional dependency.
Reply to thread Export thread (mbox)