From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IKlXKiOLoWMsIgEAbAwnHQ (envelope-from ) for ; Tue, 20 Dec 2022 11:14:59 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8I1IKiOLoWNqaAEA9RJhRA (envelope-from ) for ; Tue, 20 Dec 2022 11:14:59 +0100 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 797BE3C45D for ; Tue, 20 Dec 2022 11:14:59 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7Zcc-0007kf-KD; Tue, 20 Dec 2022 05:13:18 -0500 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 1p7ZcO-0007by-7p for help-guix@gnu.org; Tue, 20 Dec 2022 05:13:05 -0500 Received: from mail1.fsfe.org ([2001:aa8:ffed:f5f3::151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7ZcJ-000282-Ie for help-guix@gnu.org; Tue, 20 Dec 2022 05:13:03 -0500 From: Jelle Licht DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1671531174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yUOD96RPv4KSoZa9UKf+AKfEgaazbDEQGo0K+wfIlzM=; b=c7q0I8sZa/+PRLgkT2B0Q+wfa+pSKUsrl+JK+9i36SfbKk3L7HUsLSivCFt8Ehf3sn8Z+G mecyUHlmxMcWyd8UzX957dnkMmDrrVjL7F3aiT4862qOpJPUmJ2rOlXwu79IJ0auNB6Ft7 M/zliQlg9uGUzGMt6ON9a05n6vek6m0= To: Elias Kueny , help-guix@gnu.org Subject: Re: Running a shell command with home-run-on-change-service-type In-Reply-To: <87pmcfgpc9.fsf@posteo.net> References: <87pmcfgpc9.fsf@posteo.net> Date: Tue, 20 Dec 2022 11:12:51 +0100 Message-ID: <87zgbiwfh8.fsf@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:aa8:ffed:f5f3::151; envelope-from=jlicht@fsfe.org; helo=mail1.fsfe.org X-Spam_score_int: -70 X-Spam_score: -7.1 X-Spam_bar: ------- X-Spam_report: (-7.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, RCVD_IN_DNSWL_HI=-5, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fsfe.org header.s=2021100501 header.b=c7q0I8sZ; dmarc=pass (policy=none) header.from=fsfe.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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671531299; a=rsa-sha256; cv=none; b=k/1KZ3jK0nH8ZtMlQPv1YAVJgryedWv8hSjOndeWFGA3PgIMgoevh/nug4cU2bzD81V/31 7VBuL+ZLg50XCVqkN60mT/3rK67CrOH+fjJga5KLCdYNu4p8sbmqUo2uqQ3S3zVYzcYfX2 SY24ic3fCKmjFLgjwfSsDvrxw9rIH53tjy5hmF1fEJr0WhsM/uZ/9/T8/7K68swNcChRZv 6YtHJj4LLx8xk+qqVG5aEBNuUMZ3fqAQwV/jW2pc6m6j4g47iCElfsWSfpzLIfXnboAWlG wG6DDu5K4aLvKMSqAbywf/Bquaxcll8nb4ffZUaZNheLrKoqR5z6D62MyZJOsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671531299; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=yUOD96RPv4KSoZa9UKf+AKfEgaazbDEQGo0K+wfIlzM=; b=NS6TrTYmwKQ4JK/Tyv9nqUoTxkRH+NYOMOlnvE+t+y9ZHWInEGm7im4S1TsAjSHPSHqH8T oy2RJ8zVGkGC3dIE6kx4cLZM+bHjgt4lh4thMOBHHrq7c6wM05+RMMwNlul5djwu2ufkkP gZysS1Y3JiiBCo6zbExYKfEwTyC2r7gWw3yyx8jcM1nSBnoDZk+SEnsEA1yDHKMFdO7upv I8WUpP0srT/zW4e95IHuM+lMtfdjCgMIpAS9yNsdEclhLsNk420ks/kUDLTIVB/iJbX3cj Mo2mM/Bf8q7yB+2/Q5MRJshwzI7S4LUQXPj34NR6U4Dykl5xID1ix59ta7hjWg== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fsfe.org header.s=2021100501 header.b=c7q0I8sZ; dmarc=pass (policy=none) header.from=fsfe.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-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -9.72 X-Spam-Score: -9.72 X-Migadu-Queue-Id: 797BE3C45D X-TUID: F/ROijaEfbQD Elias Kueny writes: Hello Elias! Buyer beware; I am not a G-expression guru. Having said that... > Hello, > > I'm trying to extend the home-run-on-change-service-type service to run the fish command "fisher update" when the file ~/.config/fish/fish_plugins changed, so that fisher plugins are installed or removed by guix home reconfigure. > > My service definitions are: > >> (define-module (modules shells) >> #:use-module (guix gexp) >> #:use-module (gnu packages) >> #:use-module (gnu services) >> #:use-module (gnu home services) >> #:use-module (gnu home services shells)) >> >> (define-public fish-services >> (list >> (simple-service 'fisher-update-on-change >> home-run-on-change-service-type >> `(("files/.config/fish/fish_plugins" >> #~(system* #$(file-append fish "/bin/fish") "-c" "fisher update")))) ... here you quasi-quote the service extension configuration with "`". To make use of a gexp in the expression, we need to unquote the gexp expression, so replace "#~" by ",#~". HTH and gets you unstuck! - Jelle