unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Guix System definition with a .emacs.d filled
@ 2021-04-15 22:30 Jérémy Korwin-Zmijowski
  2021-04-16 14:06 ` Joshua Branson
  2021-04-16 22:16 ` Jelle Licht
  0 siblings, 2 replies; 6+ messages in thread
From: Jérémy Korwin-Zmijowski @ 2021-04-15 22:30 UTC (permalink / raw)
  To: Guix Help

Dear Guixters,

Maybe I am asking too much to Guix haha. Maybe I don't.

So. Here is what I intend to do : 

I want to write a Guix System definition that puts a .emacs.d directory
inside /root which is "usable". I don't feel the need to create a
regular user (I don't fear too much damages inside a disposable VM
context).

So I tried two options :

First, using an extra-special-file

   (extra-special-file "/root/.emacs.d"
                       (local-file "emacs.d" #:recursive? #t))

But the resulting .emacs.d is put into the store and is not writable.

Second, using skeletons

   (skeletons `((".emacs.d" ,(local-file "emacs.d" #:recursive? #t))))

But it seems it populate only regular users home directory. /root is
left empty.

Perhaps the issue is the local-file.
Perhaps I could change the resulting extra-special-file permissions if
it does not mess up the store.
Or perhaps I could create a regular user.

What would be "the way" ? haha

Cheers,
Jérémy



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix System definition with a .emacs.d filled
  2021-04-15 22:30 Guix System definition with a .emacs.d filled Jérémy Korwin-Zmijowski
@ 2021-04-16 14:06 ` Joshua Branson
  2021-04-16 21:04   ` Jérémy Korwin-Zmijowski
  2021-04-16 22:16 ` Jelle Licht
  1 sibling, 1 reply; 6+ messages in thread
From: Joshua Branson @ 2021-04-16 14:06 UTC (permalink / raw)
  To: Jérémy Korwin-Zmijowski; +Cc: Guix Help

Jérémy Korwin-Zmijowski <jeremy@korwin-zmijowski.fr> writes:

> Dear Guixters,
>
> Maybe I am asking too much to Guix haha. Maybe I don't.
>
> So. Here is what I intend to do :
>
> I want to write a Guix System definition that puts a .emacs.d directory
> inside /root which is "usable". I don't feel the need to create a
> regular user (I don't fear too much damages inside a disposable VM
> context).
>
> So I tried two options :
>
> First, using an extra-special-file
>
>    (extra-special-file "/root/.emacs.d"
>                        (local-file "emacs.d" #:recursive? #t))
>
> But the resulting .emacs.d is put into the store and is not writable.

This is by design I believe.  Any item in the store is NOT writable.
Anything configured with guix is meant to be static, declarative,
reproducible, NOT updated-able.  :)

Though it's possible that you are trying to do something that I just do
not understand.  This is most likely the case.  You seem like a genius.
:)

>
> Second, using skeletons
>
>    (skeletons `((".emacs.d" ,(local-file "emacs.d" #:recursive? #t))))
>
> But it seems it populate only regular users home directory. /root is
> left empty.
>
> Perhaps the issue is the local-file.
> Perhaps I could change the resulting extra-special-file permissions if
> it does not mess up the store.
> Or perhaps I could create a regular user.
>
> What would be "the way" ? haha

If you want a write-able /root/.emacs.d/  I would recommend starting
Emacs as root.  That would do the job for you.  :)

>
> Cheers,
> Jérémy
>

--
Joshua Branson (joshuaBPMan in #guix)
Sent from Emacs and Gnus
  https://gnucode.me
  https://video.hardlimit.com/accounts/joshua_branson/video-channels
  https://propernaming.org
  "You can have whatever you want, as long as you help
enough other people get what they want." - Zig Ziglar


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix System definition with a .emacs.d filled
  2021-04-16 14:06 ` Joshua Branson
@ 2021-04-16 21:04   ` Jérémy Korwin-Zmijowski
  2021-04-17 13:53     ` Joshua Branson
  0 siblings, 1 reply; 6+ messages in thread
From: Jérémy Korwin-Zmijowski @ 2021-04-16 21:04 UTC (permalink / raw)
  To: Joshua Branson; +Cc: Guix Help

Yo Joshua !

Thank you for taking the time to answer my question. I really
appreciate it !

Actually, my "genius" haha is working on a little script to pop a Guix
VM tailored to remotely pair-program with one or more
Guiler(s)/Schemer(s)/Guixter(s) ! After the hard work, the VM is
deleted.

So right now, I am struggling to provide Emacs with a configuration
through the system definition. The more Guix can do for me the better I
am.
Because Emacs has to download and create files into .emacs.d, the
folder has to be writable.

Until I find something clever, I will run a second script inside the VM
to clone the configuration and pull the Guix sources (so we can
contribute to Guix as well!)

PS: do you want to pair ? ;-)

Jérémy



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix System definition with a .emacs.d filled
  2021-04-15 22:30 Guix System definition with a .emacs.d filled Jérémy Korwin-Zmijowski
  2021-04-16 14:06 ` Joshua Branson
@ 2021-04-16 22:16 ` Jelle Licht
  2021-04-17  8:35   ` Jérémy Korwin-Zmijowski
  1 sibling, 1 reply; 6+ messages in thread
From: Jelle Licht @ 2021-04-16 22:16 UTC (permalink / raw)
  To: Jérémy Korwin-Zmijowski, Guix Help


Hello,

Jérémy Korwin-Zmijowski <jeremy@korwin-zmijowski.fr> writes:

> Dear Guixters,
>
> Maybe I am asking too much to Guix haha. Maybe I don't.
>
> So. Here is what I intend to do : 
>
> I want to write a Guix System definition that puts a .emacs.d directory
> inside /root which is "usable". I don't feel the need to create a
> regular user (I don't fear too much damages inside a disposable VM
> context).


> So I tried two options :
>
> First, using an extra-special-file
>
>    (extra-special-file "/root/.emacs.d"
>                        (local-file "emacs.d" #:recursive? #t))
>
> But the resulting .emacs.d is put into the store and is not writable.

I ran into a similar issue some time ago, with the same dillema.

The 'solution' that works well enough for me:
the `emacs-no-littering' package, with 
(setq no-littering-etc-directory "/tmp/emacs/etc")
      no-littering-var-directory "/tmp/emacs/var"))

HTH!
 - Jelle


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix System definition with a .emacs.d filled
  2021-04-16 22:16 ` Jelle Licht
@ 2021-04-17  8:35   ` Jérémy Korwin-Zmijowski
  0 siblings, 0 replies; 6+ messages in thread
From: Jérémy Korwin-Zmijowski @ 2021-04-17  8:35 UTC (permalink / raw)
  To: Jelle Licht, Guix Help

Hi Jelle !

Le samedi 17 avril 2021 à 00:16 +0200, Jelle Licht a écrit :
> The 'solution' that works well enough for me:
> the `emacs-no-littering' package, with 
> (setq no-littering-etc-directory "/tmp/emacs/etc")
>       no-littering-var-directory "/tmp/emacs/var"))

This is interesting ! I will definitely try it.

Thank you for passing by :)

Jérémy



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix System definition with a .emacs.d filled
  2021-04-16 21:04   ` Jérémy Korwin-Zmijowski
@ 2021-04-17 13:53     ` Joshua Branson
  0 siblings, 0 replies; 6+ messages in thread
From: Joshua Branson @ 2021-04-17 13:53 UTC (permalink / raw)
  To: Jérémy Korwin-Zmijowski; +Cc: Guix Help

Jérémy Korwin-Zmijowski <jeremy@korwin-zmijowski.fr> writes:

> Yo Joshua !
>
> Thank you for taking the time to answer my question. I really
> appreciate it !
>
> Actually, my "genius" haha is working on a little script to pop a Guix
> VM tailored to remotely pair-program with one or more
> Guiler(s)/Schemer(s)/Guixter(s) ! After the hard work, the VM is
> deleted.

ahaha!  That's a bummer!

>
> So right now, I am struggling to provide Emacs with a configuration
> through the system definition. The more Guix can do for me the better I
> am.
> Because Emacs has to download and create files into .emacs.d, the
> folder has to be writable.
>
> Until I find something clever, I will run a second script inside the VM
> to clone the configuration and pull the Guix sources (so we can
> contribute to Guix as well!)
>
> PS: do you want to pair ? ;-)

Sure!  That would give me a reason no stop being so lazy!

>
> Jérémy
>

-- 
Joshua Branson (joshuaBPMan in #guix)
Sent from Emacs and Gnus
  https://gnucode.me
  https://video.hardlimit.com/accounts/joshua_branson/video-channels
  https://propernaming.org
  "You can have whatever you want, as long as you help
enough other people get what they want." - Zig Ziglar
  


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-17 13:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 22:30 Guix System definition with a .emacs.d filled Jérémy Korwin-Zmijowski
2021-04-16 14:06 ` Joshua Branson
2021-04-16 21:04   ` Jérémy Korwin-Zmijowski
2021-04-17 13:53     ` Joshua Branson
2021-04-16 22:16 ` Jelle Licht
2021-04-17  8:35   ` Jérémy Korwin-Zmijowski

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).