guix-devel
[Top][All Lists]
Advanced

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

[RFC] refactoring extra-special-file; an /etc/tmpfiles/ equivalent


From: Attila Lendvai
Subject: [RFC] refactoring extra-special-file; an /etc/tmpfiles/ equivalent
Date: Sat, 21 Jan 2023 15:29:30 +0000

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 via email to

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