Message ID | 87eea9ixx4.fsf@trop.in |
---|---|
State | Accepted |
Headers | show |
Andrew Tropin <andrew@trop.in> writes: […] > The functions from home-services-utils used by xdg now in home-services > utils: > > From efd3ea79905c12e2c1c594fa6b54cf62d741f92f Mon Sep 17 00:00:00 2001 > From: Andrew Tropin <andrew@trop.in> > Date: Tue, 31 Aug 2021 15:40:07 +0300 > Subject: [PATCH 2/2] home-services: configuration: Add > generic-serialize-alist. > > * gnu/home-services/configuration.scm (generic-serialize-alist) > (generic-serialize-alist-entry): New variables. As you said, no variables, but functions ;-) Also, we could join those functions in Git commit message with comma. Applied with changes above. […] >> run-on-change service doesn't handle the case, where the previous >> generation doesn't exists. Fix should be pretty simple, will send a >> patch once it done. Thank you for catching this) >> > > The fix: > > From a07541380d412b33c504e5811776062af4e38582 Mon Sep 17 00:00:00 2001 > From: Andrew Tropin <andrew@trop.in> > Date: Tue, 31 Aug 2021 15:24:25 +0300 > Subject: [PATCH 1/2] home-services: run-on-change: Handle first generation > case. > > --- > gnu/home-services.scm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) […] Added Git changelog-like line. Applied. Pushed to wip-guix-home as 0c7bb26435513a61814d98af1c790e43a74afb6e. Oleg.
On 2021-08-31 17:23, Oleg Pykhalov wrote: > Andrew Tropin <andrew@trop.in> writes: > > […] > >> The functions from home-services-utils used by xdg now in home-services >> utils: >> >> From efd3ea79905c12e2c1c594fa6b54cf62d741f92f Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin <andrew@trop.in> >> Date: Tue, 31 Aug 2021 15:40:07 +0300 >> Subject: [PATCH 2/2] home-services: configuration: Add >> generic-serialize-alist. >> >> * gnu/home-services/configuration.scm (generic-serialize-alist) >> (generic-serialize-alist-entry): New variables. > > As you said, no variables, but functions ;-) > > Also, we could join those functions in Git commit message with comma. > > Applied with changes above. > > […] > >>> run-on-change service doesn't handle the case, where the previous >>> generation doesn't exists. Fix should be pretty simple, will send a >>> patch once it done. Thank you for catching this) >>> >> >> The fix: >> >> From a07541380d412b33c504e5811776062af4e38582 Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin <andrew@trop.in> >> Date: Tue, 31 Aug 2021 15:24:25 +0300 >> Subject: [PATCH 1/2] home-services: run-on-change: Handle first generation >> case. >> >> --- >> gnu/home-services.scm | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) > > […] > > Added Git changelog-like line. > > Applied. > > Pushed to wip-guix-home as 0c7bb26435513a61814d98af1c790e43a74afb6e. > > Oleg. Cool, seems now we have a working copy of guix home in wip-guix-home, I'll start cleaning up the documentation and prepare it for merging. Thank you for your help with all that stuff)
From a07541380d412b33c504e5811776062af4e38582 Mon Sep 17 00:00:00 2001 From: Andrew Tropin <andrew@trop.in> Date: Tue, 31 Aug 2021 15:24:25 +0300 Subject: [PATCH 1/2] home-services: run-on-change: Handle first generation case. --- gnu/home-services.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/home-services.scm b/gnu/home-services.scm index 2a773496f0..5608c65175 100644 --- a/gnu/home-services.scm +++ b/gnu/home-services.scm @@ -448,13 +448,14 @@ with one gexp, but many times, and all gexps must be idempotent."))) (if any-changes? (cadr x) ""))) '#$pattern-gexp-tuples)) - (if #$eval-gexps? + (if (and #$eval-gexps? (getenv "GUIX_OLD_HOME")) (begin (display "Evaling on-change gexps.\n\n") (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 evaluated, disabled by service configuration or +there are no previos generations.\n")))) (define home-run-on-change-service-type (service-type (name 'home-run-on-change) -- 2.33.0