guix-patches
[Top][All Lists]
Advanced

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

[bug#53466] [PATCH v2] home: Add redshift service.


From: Ludovic Courtès
Subject: [bug#53466] [PATCH v2] home: Add redshift service.
Date: Tue, 01 Feb 2022 09:43:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi,

Andrew Tropin <andrew@trop.in> skribis:

> On 2022-01-30 16:11, Ludovic Courtès wrote:
>
>> * gnu/home/services/desktop.scm: New file.
>> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
>> * doc/guix.texi (Desktop Home Services): New node.

[...]

> Probably, I already mentioned, but combining renamed option names from
> the configuration record and option names in the escape hatch is
> inconsistent, confusing and error-prone.

I think I replied already.

> It's very unclear where this extra-content goes and user can't know it
> until he check out the implementation or build the config (currently
> it's also almost impossible to find it on file system after build).

(He or she.)  I documented it in a way that I thought was clear:

  @item @code{extra-content} (default: @code{""}) (type: 
raw-configuration-string)
  Extra content appended as-is to the Redshift configuration file.  […]

Notice “appended”.  How would you phrase it?

> Using such type of escape hatch is no joy at all.

Escape hatches are meant to be used as a last resort; they’re a hack.
Normally, people would have everything they need with the provided
bindings.  So yes, using them is no fun, but that’s not a surprise IMO.

> Seems this one is missplaced and should be go before [manual] section,
> otherwise it won't be possible to set values of redshift section.  And
> doing so will lead to very ugly:
>
> (extra-content "\
> dawn-time=5:30
> dusk-time=18:30
> [geoclue2]
> some-other-option=value
> # Do I know that I'm in the middle of config file?")
>
> It will be especially ugly or even erroneous, when the target config has
> a format, which uses identation.
>
> I didn't try it for redshift, but in many ini parser it's forbidden to
> repeat sections with the same name.

Ah, bummer.

Another way to see it is that I should augment the bindings, maybe
that’s what you’re getting at?  :-)

I can do that.

>> +     #$(home-redshift-configuration-extra-content config)))
>
> A little offtopic:
>
> I know a number of system services, where the extra-content goes in
> unexpected locations and overall behavior of escape hatch is unexpected
> and incosistent with other escape hatches.  Some of the services has a
> number of escape hatches in almost every nested record with different
> names and behaviors.
>
> I'm relatively fresh Guix user and this part really confused me at first
> even having experience with NixOS module system before and it's very
> likely that many people just don't report it, because it really hard to
> get the roots of it.

How does NixOS handle escape hatches today?  Back when I was using it is
that it wasn’t any more consistent than what we have today, which is at
least a consolation.

Thanks,
Ludo’.





reply via email to

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