From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Help with auto-mounting a specific file-system. Date: Mon, 20 Apr 2020 16:32:18 +0200 Message-ID: <87y2qqi5xp.fsf@ambrevar.xyz> References: <87k12ald2w.fsf@ambrevar.xyz> <87tv1eldqc.fsf@ambrevar.xyz> <2638304b56ed648dd780625b49e3bb76@disroot.org> <560043a393f4298ad1f1d263535f82e8@disroot.org> <1e1aaec3b2fd14c13fe57d03d4940bc1@disroot.org> <87zhb6jxfz.fsf@ambrevar.xyz> <20200420093927.42e9608f.raghavgururajan@disroot.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48030 helo=eggs1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQXTK-0002Wn-5d for help-guix@gnu.org; Mon, 20 Apr 2020 10:32:31 -0400 Received: from Debian-exim by eggs1p.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQXTI-0006ZF-Bb for help-guix@gnu.org; Mon, 20 Apr 2020 10:32:29 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:33673) by eggs1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jQXTH-0006Rg-Ke for help-guix@gnu.org; Mon, 20 Apr 2020 10:32:28 -0400 In-Reply-To: <20200420093927.42e9608f.raghavgururajan@disroot.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: Raghav Gururajan Cc: help-guix@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Raghav Gururajan 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 corre= ct? 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 use= r'? Correct. For now Guix does not deal with user services. > >> --8<---------------cut here---------------start------------->8--- >> (define auto-mount >> (make >> #: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: =2D-8<---------------cut here---------------start------------->8--- (register-services (list auto-mount)) (action 'shepherd 'daemonize) (for-each start (append (list auto-mount))) =2D-8<---------------cut here---------------end--------------->8--- (Untested.) See my dotfiles of a complete example: https://gitlab.com/ambrevar/dotfiles =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl6dsnIACgkQm9z0l6S7 zH9enQf/fIloBRJPSRIUxZVWuULju8xpeRK2Rlf3eNf5SmABo61hD/czi4wBRkDJ YhDmkNdbk2wFe3AMeEyYXCUp8Zo2K7wrBhLtI/4nd6RZ/EhiEAPEAhVVc0U18PSv JQsRoXLCCl5nInNggntgKR4gduWVMSpROv+8rjBTaZwhHBdfttq+ci4+pV4nD2LX Cd7IhQehN4Nb1cI6Ok6BGfoOVYtIqdMCWlDVEutoI1H8n/xVFCiEDnWdpRdkJDqm NabIIOC7yb32PFyLfw6qPCVPWlmqclcGGSyzZ+mJjtE0OMpm8ejCtpYZteMYPcZF 1O9HwBkC7pA4FWLcK8V0gEkjwtuj4A== =5dcg -----END PGP SIGNATURE----- --=-=-=--