From: Pierre Neidhardt <mail@ambrevar.xyz>
To: Raghav Gururajan <raghavgururajan@disroot.org>
Cc: help-guix@gnu.org
Subject: Re: Help with auto-mounting a specific file-system.
Date: Mon, 20 Apr 2020 16:32:18 +0200 [thread overview]
Message-ID: <87y2qqi5xp.fsf@ambrevar.xyz> (raw)
In-Reply-To: <20200420093927.42e9608f.raghavgururajan@disroot.org>
[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]
Raghav Gururajan <raghavgururajan@disroot.org> writes:
> Ah I see. Btw, guix does not use udisks to mount file-systems right?
>
> Like mounting root file-system at "/", guix just uses mount command correct?
Correct.
> Oh. I have to read about types of services then. As a guess, is it the
> difference between service running 'system-wide' and 'as and for that user'?
Correct. For now Guix does not deal with user services.
>
>> --8<---------------cut here---------------start------------->8---
>> (define auto-mount
>> (make <service>
>> #:provides '(auto-mount)
>> #:start (make-system-constructor "udiskie &")
>> #:stop (make-system-destructor "pkill udiskie")
>> #:respawn? #t))
>> --8<---------------cut here---------------end--------------->8---
>
> Thanks so much. Just to double check, should I put this in my config.scm?
No, since Guix does not deal with user services.
You'd put the above snippet in ~/.config/shepherd/init.scm:
--8<---------------cut here---------------start------------->8---
(register-services (list auto-mount))
(action 'shepherd 'daemonize)
(for-each start (append (list auto-mount)))
--8<---------------cut here---------------end--------------->8---
(Untested.)
See my dotfiles of a complete example:
https://gitlab.com/ambrevar/dotfiles
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2020-04-20 14:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 6:37 Help with auto-mounting a specific file-system Raghav Gururajan
2020-04-20 9:15 ` Pierre Neidhardt
2020-04-20 9:22 ` Raghav Gururajan
2020-04-20 9:29 ` Pierre Neidhardt
2020-04-20 9:42 ` Raghav Gururajan
2020-04-20 9:52 ` Pierre Neidhardt
2020-04-20 13:39 ` Raghav Gururajan
2020-04-20 14:32 ` Pierre Neidhardt [this message]
2020-04-20 19:45 ` Michael Rohleder
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=87y2qqi5xp.fsf@ambrevar.xyz \
--to=mail@ambrevar.xyz \
--cc=help-guix@gnu.org \
--cc=raghavgururajan@disroot.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).