help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with auto-mounting a specific file-system.


From: Pierre Neidhardt
Subject: Re: Help with auto-mounting a specific file-system.
Date: Mon, 20 Apr 2020 16:32:18 +0200

Raghav Gururajan <address@hidden> 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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]