From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id Vex0MN2DZmZMSgAA62LTzQ:P1 (envelope-from ) for ; Mon, 10 Jun 2024 04:41:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id Vex0MN2DZmZMSgAA62LTzQ (envelope-from ) for ; Mon, 10 Jun 2024 06:41:01 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=p.atriar.ch header.s=dkim header.b=f1NLvkao; dmarc=pass (policy=quarantine) header.from=p.atriar.ch; arc=pass ("simplelogin.co:s=arc-20230626:i=1"); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=2; s=key1; d=yhetil.org; t=1717994461; a=rsa-sha256; cv=pass; b=UwLrS055suHGNVxnscYkexX3U17y4/nZQpHKsHX6JfmhKSwpZUJ9uuVNK492RSPdnf6rDL ZM1IeUC3jelZVUg+OGvG7rTsDiKKeJguQsyet7oO5aOHwMPMxyY607d+eKsSPRWxiYcn0s i7gZS3BGEORU8h+78FLUx+qXNfvFstbdVns602Q3kWSC68JBriOiLB4E/HLLkE3BrPK4LG W4gHie+K/VuMYow4MbzSd1TMwrNHkeN9gGLHhOR5sED5s0GtUuhBM4EznDyJsAbTtulYA4 u6G0IKV7tYywwwpsv4cgbTJSowlNDMEsgzGIV7Z5Er/LzyGvIPDjiXFgxiGH5w== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=p.atriar.ch header.s=dkim header.b=f1NLvkao; dmarc=pass (policy=quarantine) header.from=p.atriar.ch; arc=pass ("simplelogin.co:s=arc-20230626:i=1"); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717994461; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=0Z/5WttR5zBMNhecFGfL5QPcz3Do1vm/an2TBWJwaF8=; b=FFyMmjcT1aBFw8O2azU5hsdqAtcNZgFPbIzesjEH40U9kpf/6e4pTnuq3wyBDvXlv5hC/f K4+uTX+xnnuHo0s8Izgohg4OfZekLPP1dOzKpUD8sL4FI6ywRtWypx7+d4b+ZU4hxd0xWk hTVEnRxR6q8BqgRbj1OtmUZs4MyAc48JBNY/k5h6sLPYpBs7pQ9vVaGskek2lwS3na01mR GXK3nc0uiTS8WVowDKZEN5++5ofEdO4Nu6ZqIyVr4WpUPtfaaJE5NyyYPUvOFIcQuqJ+G5 Bs9EUNSVc+UDOZnB68fJsUCHIgriDNy/m6jdU113xsiAS9UdvfRm+CI0ZsXTrA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 76D181293A for ; Mon, 10 Jun 2024 06:41:00 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGWpV-00088z-Lr; Mon, 10 Jun 2024 00:40:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGWpT-000884-V8 for help-guix@gnu.org; Mon, 10 Jun 2024 00:40:23 -0400 Received: from mail-200166.simplelogin.co ([176.119.200.166]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGWpR-0001Yj-S3 for help-guix@gnu.org; Mon, 10 Jun 2024 00:40:23 -0400 ARC-Seal: i=1; a=rsa-sha256; d=simplelogin.co; s=arc-20230626; t=1717994116; cv=none; b=vw7388kW3s+XurC4DMaIJERo8nqoRm9eA7PQAG2+jGl04w/yqt8uSpBJDYKADAgGOtpuuDwUfwMX9M2hMc/WvgIZu/P5ImAyt8tMBSIMzv1kOrsANfTmVq59y2W6THV1t0ZOFUW0G4niRjS4AVSim1rJHfLDLDEVzC6KBvRYLJ9u/fPsApCsBIZaOKVxv2hqnhiYcDW1wrCLJP1mYPcJmseq71+gnCIUTg4VFo1U/jIrkshyGfn7fTV0pOyo1s4gSu4lUI73N06XKdjnpy0PMFxwIcwPv9+jlBxLaXKCLMA1g4WVY0wB7YKAKZlAcOldWnzjd9vBwdC1mMV5rUoV+w== ARC-Message-Signature: i=1; a=rsa-sha256; d=simplelogin.co; s=arc-20230626; t=1717994116; c=relaxed/simple; bh=7JPmd9batIeDyk6pzwkB1kdNVmsDsM6mxwFsf/um5UI=; h=Date:Subject:From:To; b=xI7fubruXNDJRMqc2lB6i3lnVZFZRd6EWIrqIuvEWq/qfg3vy7oQLSdAE+sYOezor8Q/uuGGBLRHBrWQjzw3ypVsC/JKHRBfSMxnXs6yeqjUVrLSADLITtuDiBnEcXFE8615ikN+XrKN5FpZ4hT1xtrAyOH+Tw7bZ83/VugsE19a7DBwVYjb4uJQRF14d9NGh42jdV37l2roK8w5GdYx0eE1CM5CIImijPDSQkcAnASpDvZNfSxSvsG+jyIr7ZYhRPCDsHLBLfbn2fZidNP99jaQmLwpoA4FcSLvbdTk2GaDYscm08sbvJq9cJZVHb/SOh+5D4RjAerU2kqPkKVOjg== ARC-Authentication-Results: i=1; mail.protonmail.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=p.atriar.ch; s=dkim; t=1717994116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Z/5WttR5zBMNhecFGfL5QPcz3Do1vm/an2TBWJwaF8=; b=f1NLvkaojDrWB5h6W6rlufXBdQ4OT45WdleA52XZklvrTHMsMFhZ0pZM/+oa3ULsDVznfD 6vWjInrNc5lDw/MM0gEepV9+sxpWICwFNuH5xgHN0dpIxQyJ5E29OsVbE4HkoKQq+0VU5H hJj3CwgYmwr6360OWC5FYxSvzNz9aPs= Date: Mon, 10 Jun 2024 04:35:09 +0000 Subject: Seeking help with g-expressions maze MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="------280cb047ed25db69d05977865dfacd38fe34561cf6cf9f32bb50c46d969d4091"; charset=utf-8 Content-Transfer-Encoding: 7bit From: =?utf-8?b?QWJiw6k=?= To: help-guix@gnu.org Message-ID: <171799411588.7.857514431154339738.351278683@p.atriar.ch> X-SimpleLogin-Type: Reply X-SimpleLogin-EmailLog-ID: 351278683 X-SimpleLogin-Want-Signing: yes Received-SPF: pass client-ip=176.119.200.166; envelope-from=sl.lmysyibtguytenzygy4dglbagezdqmztge2v2.75ydmgayqyuq4@p.atriar.ch; helo=mail-200166.simplelogin.co X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 76D181293A X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -10.64 X-Spam-Score: -10.64 X-TUID: 18srzcWnNKWM This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------280cb047ed25db69d05977865dfacd38fe34561cf6cf9f32bb50c46d969d4091 Content-Type: multipart/mixed;boundary=---------------------cb134080911b62fdf44e956d0c4333a4 -----------------------cb134080911b62fdf44e956d0c4333a4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;charset=utf-8 Hi, I'm trying to implement a guix home service module for rbw, and ended up w= ith following: ----------------8<----------------------8<----------------------- (define-module (abbe services rbw) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix records) #:use-module (gnu home services) #:use-module (gnu home services xdg) #:use-module (gnu services) #:use-module (gnu services configuration) #:use-module (gnu packages gnupg) #:use-module (json) #:use-module (ice-9 match) #:export (home-rbw-configuration home-rbw-configuration? home-rbw-configuration-pinentry-program home-rbw-configuration-email home-rbw-configuration-base-url home-rbw-configuration-identity-url home-rbw-configuration-notifications-url home-rbw-configuration-client-cert-path home-rbw-configuration-sync-interval home-rbw-configuration-lock-timeout home-rbw-config-files home-rbw-service-type)) (define-maybe string) (define-configuration/no-serialization home-rbw-configuration (pinentry-program (file-like (file-append pinentry "/bin/pinentry-curses")) "Pinentry program to use.") (email (string "") "Email address of the user") (base-url maybe-string "Base URL") (identity-url maybe-string "Identity URL") (notifications-url maybe-string "Notifications URL") (client-cert-path maybe-string "Client certificate path") (sync-interval (integer 3600) "Synchronization interval") (lock-timeout (integer 3600) "Lock timeout")) (define (home-rbw-config-files config) (define (rbw-config config) (match-record config (pinentry-program email base-url identity-url notificati= ons-url client-cert-path sync-interval lock-ti= meout) `((pinentry-program . ,pinentry-program) (email . ,email) (base_url . ,base-url) (identity_url . ,identity-url) (notifications_url . ,notifications-url) (client_cert_path . ,client-cert-path) (sync_interval . ,sync-interval) (lock_timeout . ,lock-timeout)))) (define (home-rbw-configuration-file config) (let ((xformed-config (rbw-config config))) (computed-file "rbw-config.json" = #~(call-with-output-file #$output (lambda (port) (display #$(scm->json-string xformed-config) po= rt)))))) `(("rbw/config.json" ,(home-rbw-configuration-file config)))) (define home-rbw-service-type (service-type (name 'home-rbw) (extensions (list (service-extension home-xdg-configuration-files-service-type home-rbw-config-files))) (default-value (home-rbw-configuration)) (description "Configure rbw"))) ----------------8<----------------------8<----------------------- While applying this module, I end up with following obvious error, but I'm= not quite sure how to go about resolving this: ----------------8<----------------------8<----------------------- ice-9/boot-9.scm:1685:16: In procedure raise-exception: Throw to key `json-invalid' with args `(# "/bin/pinentry-curses">)'. ----------------8<----------------------8<----------------------- Following is the service definition I'm using in my home configuration: ----------------8<----------------------8<----------------------- (service home-rbw-service-type (home-rbw-configuration)) ----------------8<----------------------8<----------------------- I'm coming from nix background, documentation on G Expressions documentati= on seem a bit overwhelming, akin to Haskell for a C programmer. Any help will be appreciated. Thanks! -- Abbe -----------------------cb134080911b62fdf44e956d0c4333a4-- --------280cb047ed25db69d05977865dfacd38fe34561cf6cf9f32bb50c46d969d4091 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wnUEARYKACcFgmZmgm4JkL9QKcjQdcr0FiEEPAHKC9W+qGYECCHrv1ApyNB1 yvQAAD/AAP48kGCYQIzd0qxgHlOxBQz8DsZXlDSMjogNgLWR26taUgEAxegz wlSPGU7DCJ/kUadk87rfKirk3lPytCtCPvZ0jgA= =ZgxC -----END PGP SIGNATURE----- --------280cb047ed25db69d05977865dfacd38fe34561cf6cf9f32bb50c46d969d4091--