[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19/21: home-services: run-on-change: Handle first generation case.
From: |
guix-commits |
Subject: |
19/21: home-services: run-on-change: Handle first generation case. |
Date: |
Thu, 9 Sep 2021 13:33:38 -0400 (EDT) |
wigust pushed a commit to branch wip-guix-home
in repository guix.
commit 5d4f39e64ab446f11d22721464c2dc418c0d9b98
Author: Andrew Tropin <andrew@trop.in>
AuthorDate: Tue Aug 31 15:24:25 2021 +0300
home-services: run-on-change: Handle first generation case.
* gnu/home-services.scm
(compute-on-change-gexp): Handle first generation case.
Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
---
gnu/home-services.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index 2a77349..9f1e986 100644
--- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -439,7 +439,10 @@ with one gexp, but many times, and all gexps must be
idempotent.")))
(define expressions-to-eval
(map
(lambda (x)
- (let* ((file1 (string-append (getenv "GUIX_OLD_HOME") "/" (car x)))
+ (let* ((file1 (string-append
+ (or (getenv "GUIX_OLD_HOME")
+ "/gnu/store/non-existing-generation")
+ "/" (car x)))
(file2 (string-append (getenv "GUIX_NEW_HOME") "/" (car x)))
(_ (format #t "Comparing ~a and\n~10t~a..." file1 file2))
(any-changes? (something-changed? file1 file2))
@@ -454,7 +457,8 @@ with one gexp, but many times, and all gexps must be
idempotent.")))
(for-each primitive-eval expressions-to-eval)
(display "On-change gexps evaluation finished.\n\n"))
(display "\
-On-change gexps won't evaluated, disabled by service configuration.\n"))))
+On-change gexps won't be evaluated, disabled by service
+configuration.\n"))))
(define home-run-on-change-service-type
(service-type (name 'home-run-on-change)
- branch wip-guix-home created (now 6b5ff71), guix-commits, 2021/09/09
- 01/21: home-services: Add most essential home services., guix-commits, 2021/09/09
- 02/21: home-services: Add home-run-on-change-service-type., guix-commits, 2021/09/09
- 06/21: home-services: Add fontutils., guix-commits, 2021/09/09
- 04/21: home-services: Add fold-home-service-types function., guix-commits, 2021/09/09
- 14/21: gnu: home: Add doc comment about the module., guix-commits, 2021/09/09
- 17/21: scripts: home: Add import subcommand., guix-commits, 2021/09/09
- 07/21: home-services: Add helper functions for service configurations., guix-commits, 2021/09/09
- 16/21: scripts: Add 'guix home'., guix-commits, 2021/09/09
- 08/21: home-services: Add shells., guix-commits, 2021/09/09
- 19/21: home-services: run-on-change: Handle first generation case.,
guix-commits <=
- 13/21: home-services: activation: Add support for multiline env vars., guix-commits, 2021/09/09
- 05/21: home-services: Add symlink-manager., guix-commits, 2021/09/09
- 09/21: home-services: Add xdg., guix-commits, 2021/09/09
- 11/21: home-services: Add utils module., guix-commits, 2021/09/09
- 12/21: home-services: symlink-manager: Properly handle 1st generation case., guix-commits, 2021/09/09
- 18/21: home-services: configuration: Add generic-serialize-alist., guix-commits, 2021/09/09
- 10/21: home: Add home-environment., guix-commits, 2021/09/09
- 15/21: gnu: local.mk: Tabify., guix-commits, 2021/09/09
- 03/21: home-services: Add home-provenance-service-type., guix-commits, 2021/09/09
- 20/21: doc: Add Guix Home documentation., guix-commits, 2021/09/09