From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mAl0MBskSWOIagAAbAwnHQ (envelope-from ) for ; Fri, 14 Oct 2022 10:55:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OA5nLxskSWNeBAEAG6o9tA (envelope-from ) for ; Fri, 14 Oct 2022 10:55:55 +0200 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 829443D9AC for ; Fri, 14 Oct 2022 10:55:55 +0200 (CEST) Received: from localhost ([::1]:51198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojGTy-00010h-Fw for larch@yhetil.org; Fri, 14 Oct 2022 04:55:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojGTH-0000zB-NN for help-guix@gnu.org; Fri, 14 Oct 2022 04:55:12 -0400 Received: from knopi.disroot.org ([178.21.23.139]:36442) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojGTF-0001Sz-9A for help-guix@gnu.org; Fri, 14 Oct 2022 04:55:11 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id E189B4DC97; Fri, 14 Oct 2022 10:55:06 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E08A1qxkhmt9; Fri, 14 Oct 2022 10:55:05 +0200 (CEST) Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665737704; bh=hLucUbpcC/8MtlBMxTbOsCanJ2JX7YiKRVLToi7rZ10=; h=Date:Subject:From:To:References:In-Reply-To; b=WUlDT9yBV9aeVOuLpb8V4XIfuH6GSe8TSKWvlF3jwQYi0lAEKQ6z0bY1Nqmz2ab+g uauqi7Jcp8h93zzqsICDAvtJFOhDHYqJz2d4K6WHBaaZ3laviDeoAbRTQJe8EDp0lY fE4IcrRY1LpFcNMDTF26gDFZ18F7VnGqVN0tono5mMsR3bzie50vdUPHLxfFud7bVE BZ0dnHgV/o9x6daUYIWMEqC8IXzFahO45D2OhURxzNaFXFU0wFMbHlmHfavIW11AEy 3cx7vQ4Hq4PseGulu/bw008r44QbXZmB+sj1Ox+iIZkhu0HMUq0h3yFrtdp/k69o+7 Xf2AvFWfhgZrw== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 14 Oct 2022 09:55:03 +0100 Message-Id: Subject: Re: Calling gpg encrypt inside mixed-text-file From: "(" To: "Reza Housseini" , References: <2e8004f1-e30e-3b45-31e4-af75812d1e82@gmail.com> In-Reply-To: <2e8004f1-e30e-3b45-31e4-af75812d1e82@gmail.com> Received-SPF: pass client-ip=178.21.23.139; envelope-from=paren@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665737755; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=+HXnA3Cui52/N9HD8wFxRUk4YrIcmmS8mCZwPFWVoUo=; b=kDrvcyi19NVl4wgP6UTLI/zdyZb8olg7sLKeJ8+N3c8u31AboZ0JVxvzwvjP53bps15InF GZNwglF0p35f7v/sAAa18rcWg8zdnF90iS9TgaIPT/cXJw1PJQMdkU4+suGgwGSQVmL499 J/486EiKkpCiXUYtIQZbCbZ/UerCa1Z/xVMz3oH/IEn95m7VnxwasgdJFwJ/ZqqK281hDg HhG30I6bqc5ONtSjgKKV64pggq7L4/pUnw+J1edwIo4k7Q32EEYwbo9krIapUWySjlEJAi Dr2R9DkfuR4jMFxRPDgc/S0tz+AIJ6TJ4XUsieFaPBmmz65oRRpYLs/tOkoUtQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665737755; a=rsa-sha256; cv=none; b=SRhnWIltrN2+HnxOo0Awvs2i+gg6/fPBmy1OALjQVT+7gxdfEWAfSTzyXoxn72lvCJoN+z +DUlD3K+4PQ4pkpIiKBmLXtCYeluy8u8HXgmbuBkjvmzUlIrD63osFPxrQ3HDEuLZk2fIR qrtDDyBd1z2pgMUa6vS66JPZWqOBtoSkfiYkkjIRxhYMPWXWGh+10OPVHZ9cfUyX5YO6Eq 2M++LKGGgjxwW4J0vwy4Sue8cTaOXOBTJPIzlpue+3Ca7GudUvDcXzyHFcY/YMIkMt+E/4 WtnI8qRMXqAM25cWMPUMYmRcyI6g0Z7WHIwTn+sCpgbXrD+AYm/T2AD//9TMtA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=WUlDT9yB; dmarc=pass (policy=quarantine) header.from=disroot.org; 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" X-Migadu-Spam-Score: -1.40 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=WUlDT9yB; dmarc=pass (policy=quarantine) header.from=disroot.org; 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" X-Migadu-Queue-Id: 829443D9AC X-Spam-Score: -1.40 X-Migadu-Scanner: scn1.migadu.com X-TUID: fm0QlUApYxAg Hey Reza, On Fri Oct 14, 2022 at 9:40 AM BST, Reza Housseini wrote: > (service radicale-service-type > (radicale-configuration > (config-file (mixed-text-file "radicale.conf" " > [auth] > type =3D htpasswd > htpasswd_filename =3D " (local-file "my-password.gpg ") " > htpasswd_encryption =3D plain > ")))) > > This obviously does not work, but how would I achieve to call gpg=20 > --decrypt --quiet inside the mixed-text-file? You'll need two things; ``computed-file'', and the ``(ice-9 popen)'' standa= rd library module. ``computed-file'' allows you to build a file-like object fr= om arbitrary code. Have a look here for an example from my configuration, https://git.sr.ht/~unmatched-paren/conf/tree/root/item/home.scm#L168 which removes all ``//'' comments from ``waybar.json'' before writing the result to the store path. Also see the Guix and Guile manuals on these two subjects, ``(ice-9 popen)'': https://www.gnu.org/software/guile/manual/html_node/Pi= pes.html ``computed-file'': https://guix.gnu.org/manual/en/html_node/G_002dExpress= ions.html#index-computed_002dfile -- (