GNU bug report logs - #50979
"home configuration" generated by "guix home import" does not lead to a reproducible home environment

Previous Next

Package: guix;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Sat, 2 Oct 2021 20:12:02 UTC

Severity: normal

To reply to this bug, email your comments to 50979 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#50979; Package guix. (Sat, 02 Oct 2021 20:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxime Devos <maximedevos <at> telenet.be>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 02 Oct 2021 20:12:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: bug-guix <at> gnu.org
Subject: "home configuration" generated by "guix home import" does not lead
 to a reproducible home environment
Date: Sat, 02 Oct 2021 22:11:39 +0200
[Message part 1 (text/plain, inline)]
Hi,

I ran "guix home import".  The output seems mostly reasonable, but the use
of 'local-file' seems troublesome:

;; [comments] 
(use-modules [modules])

(home-environment
  (packages [stuff])
  (services
    (list (service
            home-bash-service-type
            (home-bash-configuration
              (bashrc
                (list (slurp-file-gexp
                        (local-file "/home/[USER]/.bashrc"))))
              (bash-profile
                (list (slurp-file-gexp
                        (local-file "/home/[USER]/.bash_profile")))))))))

IIUC, when I will run "guix home reconfigure", guix home will intern
~/.bashrc and ~/.bash_profile in the store, build things, and eventually
replace ~/.bashrc with some symlink to something in the store.

I assume this technically all works out, but this seems a bit irreproducible.
What I made modifications to ~/.bash_profile?  It seems like, if I run "guix home reconfigure"
on the same system, the modifications will be preserved, which is fine.  However,
what if I log into another system, copy the home configuration, and run "guix home reconfigure"
from there?   Then "guix home reconfigure" would pick up the ~/.bash_profile from the new system
(without the modifications) instead of the old system, right?

Then the home configuration generated by "guix home import" isn't self-contained,
which seems unfortunate.

Two proposals for addressing the issue:

  (1) Use 'plain-file' instead of 'local-file', to include the contents of ~/.bashrc inside
      the generated configuration

  (2) Let "guix home import" create a directory with the "home-environment.scm", ".bashrc"
      and ".bash_profile".

Greetings,
Maxime
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 203 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.