From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GATwOQXBumXWMgAAe85BDQ:P1 (envelope-from ) for ; Wed, 31 Jan 2024 22:52:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id GATwOQXBumXWMgAAe85BDQ (envelope-from ) for ; Wed, 31 Jan 2024 22:52:06 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=zancanaro.id.au header.s=k1 header.b=gJpZexmV; 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"; dmarc=pass (policy=none) header.from=zancanaro.id.au ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706737925; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=Gel2TxllbLuXNhocbKlRJTVvLcfzfBbdbK510ndea4M=; b=kozMKrvdMLqf/9ObnUL+ZKHu6j9J9jIg9jDTMYL4enieJgupxmMDJILCU4bWpx/Fz836H1 tgYWBhPJJkA1paOb0FJD7LRSByYC364qfYmIW2C3NiY9VrhVeIjKmlshY/nkDi7H4pKGqz lXZQZ5smPfMuYbqcOn3hhGlHSRJuz1ZYKtGmFtAsoyBMFqAjG1qFf2fqfP01tYJKAvy09M aSrpN5tEY/MFrwPQdw6qxduW2giExhxIGtOwaVpl1tH7o4+Lqekdg8DItogExc/pROJiJF fkBqfVUZGuNnsCGlmR6eTk8mTe/EGrtRq+bHO6+jEKQ6wzj7cwpHobG0Ibh1GQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=zancanaro.id.au header.s=k1 header.b=gJpZexmV; 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"; dmarc=pass (policy=none) header.from=zancanaro.id.au ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706737925; a=rsa-sha256; cv=none; b=nuNLgjDkNHwqnSX6pUWdTlngcRVW4/H24S4fUcX/C3h7UV3RBVtbuN9UKHWQRHLXPukany 7TFUT5cae//zqED+WGr5ZAgmT5HpjL4tWyyjf1qGAXkKSq4FgvqgAbSp2+dih3BM71BakB aDO8MHihiEhTPtgbVpyUDMpBTV8rKx6F4F0thVQAEEEolIjJ91UgxFfCZMJ10AIwslB7ii scCsvxJrASfknQbY9HQhSbBXcppGkS1VqxsWn7f+nCAHJU+k0rMyn5LkrDRGDSW2nz3jPc KikKMNZLU2ZJ/gOqvUn6+bYE0BRKMsGZ0b/GAUEzz+5qQbatzZgut8nFBth6Sg== 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 A926C5EE40 for ; Wed, 31 Jan 2024 22:52:04 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVIUX-0005kh-OR; Wed, 31 Jan 2024 16:51:33 -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 1rVIUU-0005kV-Qz for help-guix@gnu.org; Wed, 31 Jan 2024 16:51:31 -0500 Received: from voltorb.zancanaro.id.au ([45.77.50.64]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVIUR-0008Vu-OF for help-guix@gnu.org; Wed, 31 Jan 2024 16:51:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=k1; bh=Gel2TxllbLuXNho cbKlRJTVvLcfzfBbdbK510ndea4M=; h=date:references:in-reply-to:subject: cc:to:from; d=zancanaro.id.au; b=gJpZexmV9lKUe5zPZOlQ1sg3CH0HaEHr+tBzV DjLXMWoYiqGVUEZKcnL8C6wVhjWmeyTUDTc90NigA6LH5XH5+7O4suGNxS4ItmJX0XnGKm X5yAtuSQC1zQ2qTxx1/EOnub2ISrK5lIFOwCSKVSc5oYm2j5CrvAwMLs0Eq/B9Q8= Received: by voltorb.zancanaro.id.au (OpenSMTPD) with ESMTPSA id cd415f0e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 31 Jan 2024 21:51:06 +0000 (UTC) From: Carlo Zancanaro To: Christopher Chmielewski Cc: help-guix@gnu.org Subject: Re: clamav freshclam - how to provide /etc config in general In-Reply-To: <8b6b7b1b-a4d6-4213-b33d-57a04bba4c96@fastmail.com> (Christopher Chmielewski's message of "Tue, 30 Jan 2024 23:13:07 -0500") References: <8b6b7b1b-a4d6-4213-b33d-57a04bba4c96@fastmail.com> Date: Thu, 01 Feb 2024 08:51:15 +1100 Message-ID: <87fryd41f0.fsf@zancanaro.id.au> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=45.77.50.64; envelope-from=carlo@zancanaro.id.au; helo=voltorb.zancanaro.id.au 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, 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.27 X-Migadu-Queue-Id: A926C5EE40 X-Spam-Score: -9.27 X-Migadu-Scanner: mx11.migadu.com X-TUID: HCP9f1OYkVJG Hi Christopher, On Tue, Jan 30 2024, Christopher Chmielewski wrote: > So my question is more general. How do you provide config files for > software that expects it to be located in /etc? Is there a best > practice? On a Guix system, you can do this by extending etc-service-type, which writes files to /etc. If you add the following to your operating-system's services then it should create a file in /etc/clamav/freshclam.conf with the contents "config goes here". (simple-service 'freshclam-config etc-service-type `(("clamav/freshclam.conf" ,(plain-file "freshclam.conf" "config goes here")))) If you already have a file that you'd like to use as the config file, you could instead use local-file with an appropriate path: (simple-service 'freshclam-config etc-service-type `(("clamav/freshclam.conf" ,(local-file "path/to/freshclam.conf")))) These things are also documented in the manual, if you'd like to read more. See "(guix) Service Reference" for etc-service-type and simple-service, and "(guix) G-Expressions" for local-file and plain-file. The above is for defining this sort of configuration in an "ad-hoc" way: directly managing the files in /etc. A "better" approach is to define a Guix system service to manage the configuration. This is more involved, though, so I wouldn't recommend it to solve your immediate problem. You can read more about this in the manual under "(guix) Defining Services". I hope that helps, Carlo