From: Christopher Chmielewski <christopherchmielewski@fastmail.com>
To: Carlo Zancanaro <carlo@zancanaro.id.au>
Cc: help-guix@gnu.org
Subject: Re: clamav freshclam - how to provide /etc config in general
Date: Thu, 1 Feb 2024 19:18:59 -0500 [thread overview]
Message-ID: <f2679416-f79c-429c-b1c5-a050947150c0@fastmail.com> (raw)
In-Reply-To: <87fryd41f0.fsf@zancanaro.id.au>
Hi Carlo,
Thank you! I will try it out.
Chris
On 2024-01-31 16:51, Carlo Zancanaro wrote:
> 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
prev parent reply other threads:[~2024-02-02 0:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 4:13 clamav freshclam - how to provide /etc config in general Christopher Chmielewski
2024-01-31 21:51 ` Carlo Zancanaro
2024-02-02 0:18 ` Christopher Chmielewski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f2679416-f79c-429c-b1c5-a050947150c0@fastmail.com \
--to=christopherchmielewski@fastmail.com \
--cc=carlo@zancanaro.id.au \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.