diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-10-09 11:51:44 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-10-11 18:29:11 +0200 |
commit | 795d430d90e41eb172315bfccf79c9f13fc0ebfa (patch) | |
tree | b62c24bbcc1851db652f9b48983713dbe0607a79 /guix/scripts.scm | |
parent | 50c72ecd9e272d959dfc346b5baea9137f6820ad (diff) |
pull: Turn ~/.config/guix/current into a symlink to /var/guix/profiles.
This is more consistent with what 'guix package' does, more pleasant for
users (we no longer clobber ~/.config/guix), and more
cluster-friendly (since /var/guix/profiles is usually an NFS share
already.)
* guix/scripts/pull.scm (%current-profile, %user-profile-directory): New
variables.
(migrate-generations, ensure-default-profile): New procedures.
(guix-pull): Use %CURRENT-PROFILE by default. Call
'ensure-default-profile'.
* doc/guix.texi (Invoking guix pull): Adjust 'guix package -p
~/.config/guix/current' example.
* guix/scripts.scm (warn-about-old-distro): Check %PROFILE-DIRECTORY
"/current-guix".
Diffstat (limited to 'guix/scripts.scm')
-rw-r--r-- | guix/scripts.scm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guix/scripts.scm b/guix/scripts.scm index 4cbbbeb96f..98751bc812 100644 --- a/guix/scripts.scm +++ b/guix/scripts.scm @@ -26,6 +26,7 @@ #:use-module (guix monads) #:use-module (guix packages) #:use-module (guix derivations) + #:use-module ((guix profiles) #:select (%profile-directory)) #:use-module (srfi srfi-1) #:use-module (srfi srfi-19) #:use-module (srfi srfi-37) @@ -169,8 +170,7 @@ Show what and how will/would be built." (define age (match (false-if-not-found - (lstat (string-append (config-directory #:ensure? #f) - "/current"))) + (lstat (string-append %profile-directory "/current-guix"))) (#f #f) (stat (- (time-second (current-time time-utc)) (stat:mtime stat))))) |