unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Gary Johnson <lambdatronic@disroot.org>
To: c4droid <c4droid@foxmail.com>
Cc: help-guix@gnu.org
Subject: Re: Setting link file permission in home-files-service-type
Date: Tue, 21 Mar 2023 10:15:40 -0400	[thread overview]
Message-ID: <87r0tixk5h.fsf@disroot.org> (raw)
In-Reply-To: <tencent_95550EB74544AC89C306D79548662BE5F408@qq.com>

c4droid <c4droid@foxmail.com> writes:

> I'm changing my mailing workflow from fetchmail + procmail + msmtp +
> mutt to fdm + msmtp + mutt, configuration file is already prepared, the
> fdm and msmtp configuration file need 600 permission, guix home
> home-files-service-type give 644 default, have workaround for when
> symlinking change permission for target file.
>
> My home.scm configuration cut:
> ``` scheme
> (home-environment
>  (services
>   (list
>    (service home-files-service-type
>             `((".fdm.conf" ,(local-file "dotfiles/fdm.conf"))
>               (".msmtprc" ,(local-file "dotfiles/msmtprc")))))))
> ```

As mentioned on another thread recently, you need to pass the
`#:recursive? #t` option to `local-file` if you want to preserve your
file permissions.

``` scheme
(home-environment
 (services
  (list
   (service home-files-service-type
            `((".fdm.conf" ,(local-file "dotfiles/fdm.conf" #:recursive? #t))
              (".msmtprc" ,(local-file "dotfiles/msmtprc" #:recursive? #t)))))))
```

Happy hacking!
  Gary

-- 
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


      parent reply	other threads:[~2023-03-21 14:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20  0:55 Setting link file permission in home-files-service-type c4droid
2023-03-20  1:15 ` Felix Lechner via
2023-03-20  2:20   ` c4droid
2023-03-21 14:15 ` Gary Johnson [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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0tixk5h.fsf@disroot.org \
    --to=lambdatronic@disroot.org \
    --cc=c4droid@foxmail.com \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).