all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: guix-devel <guix-devel@gnu.org>
Subject: [RFC] refactoring extra-special-file; an /etc/tmpfiles/ equivalent
Date: Sat, 21 Jan 2023 15:29:30 +0000	[thread overview]
Message-ID: <bnkFpeHl43kNvaDPIHgLNSRTi22q-vRS5Bp-2-fX3BuOXtYQYqRLYFicv8Pk6qRvMP7EORKlNxcIFNUHYIyK0J5U-Qe8b1Iy8TJn1mlHvus=@lendvai.name> (raw)

hello Guix,

context 1:

i want to write a string into a file at boot to disable wake-up by my keyboard (so that it doesn't immediately wake up my laptop after i suspend it). it requires doing this once per boot:

echo XHC >/proc/acpi/wakeup

the standard solution on systemd distros is to use a /etc/tmpfiles.d/disable-usb-wake.conf file, which systemd interprets (see e.g. https://forums.linuxmint.com/viewtopic.php?f=42&t=312953).


context 2:

i need to create an empty directory in an image created by `guix system vm ...` (for "reasons"; this is the simplest way i'm aware of to hack forward).


in Guix we have extra-special-file (what a strange name!) that in fact can do one thing: a (single shot?) shepherd service that can symlink something somewhere.

what i need is something like extra-special-file, but with a few more keyword arguments that would allow creating empty directories, and appending/overwriting files with content given as literals.

or something else that i'm not aware of?


solution 1:

i think i could backwards compatibly extend extra-special-file with the keyword args.

solution 2:

introduce a new abstraction (preferrably with a better name), and mark extra-special-file obsolete.

dear maintainers, any thoughts on which way i should start digging?

also, any suggestion for the API? the naming of the keyword args?

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Angry people want you to see how powerful they are… loving people want you to see how powerful You are.”
	— Chief Red Eagle



             reply	other threads:[~2023-01-21 15:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-21 15:29 Attila Lendvai [this message]
2023-02-10 12:05 ` [RFC] refactoring extra-special-file; an /etc/tmpfiles/ equivalent Attila Lendvai
2023-02-10 13:38   ` Attila Lendvai

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

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

  git send-email \
    --in-reply-to='bnkFpeHl43kNvaDPIHgLNSRTi22q-vRS5Bp-2-fX3BuOXtYQYqRLYFicv8Pk6qRvMP7EORKlNxcIFNUHYIyK0J5U-Qe8b1Iy8TJn1mlHvus=@lendvai.name' \
    --to=attila@lendvai.name \
    --cc=guix-devel@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.