all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* The `channels' field of `operating-system' record
@ 2024-04-07 16:05 Tomas Volf
  2024-04-10 15:17 ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Tomas Volf @ 2024-04-07 16:05 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2993 bytes --]

Hello,

yesterday I had to debug a really weird problem.  I had a extra-special-file in
my system configuration used to create /etc/guix/channels.scm, but it was not
working, the channels file contained something completely else then I put into
it.  In particular, this sequence in the configuration:

    (extra-special-file "/etc/guix/channels.scm" file/channels.scm)
    (extra-special-file "/etc/guix/xxx" file/channels.scm)
    (extra-special-file "/etc/guix/yyy" file/channels.scm)

Produced this on the file system:

    channels.scm -> /gnu/store/icw828kvva25ns9p0y0np7lp3c7xl0n6-channels.scm
    xxx -> /gnu/store/w3gip7zqrqxbp8kaplq6kia85i5c4fh8-channels.scm
    yyy -> /gnu/store/w3gip7zqrqxbp8kaplq6kia85i5c4fh8-channels.scm

Notice that, despite being created by the exact same code, the store items
differs.

After ~2 hours of digging I realized this is caused by the changes in
883e69cdfd226c8f40b6e3b76ce0740b59857de6.

I see couple of issues here (in no particular order, questions prefixed with Q):

* My configuration file just *silently* stopped working.

That is not great for obvious reasons.

* There is no news entry

I did not realize it stopped working for some time (but it explains few weird
issues I had lately) until I tried to install completely new system where I
actually went to check it works as expected.

* Broken default behavior.

Currently, out of the box, extra-special-file with "/etc/guix/channels.scm" just
does not do anything.  No error, no warning.  That is pretty unexpected.

* There is no terse way to turn it off

Currently my configuration contains this:

      (modify-services %base-services
        (guix-service-type
         config => (guix-configuration
                    (inherit config)
                    (channels #f))))

That is 5 lines instead of single token %base-services just to restore the
original non-broken behavior.  Would be nice to have guix-extension for this
turning it into 2 lines.

* Q: Is there an easy way to fill (channels)?

After I learned that (channels) is a thing, I wanted to use it, but did not find
any simple way how to do so.  My channels are in channels.scm produced by `guix
describe --format=channels', and I do not see any simple way to pass the content
of that file into (channels).  No, it does not accept (local-file).  I tried
just (read)-ing it, but that too does not work.

I could steal the code from scripts/pull.scm, but that cannot be the intended
way, right?  So how should I do this?  What procedure did I failed to find?

* Q: Is the default value right?

Currently it defaults to %default-channels, which causes all this magic.  Would
it not be better to default to #f, so that it would do nothing magical out of
the box and would be backwards compatible?  You could still turn it on by
(Somehow?  See above.) providing desired value.



Have a nice day,
Tomas Volf

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread
* The `channels' field of `operating-system' record
@ 2024-04-09  4:06 Nathan Dehnel
  2024-04-09  4:16 ` Marek Paśnikowski
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nathan Dehnel @ 2024-04-09  4:06 UTC (permalink / raw)
  To: ~, guix-devel

I don't think you're supposed to edit /etc/guix/channels.scm directly,
I think it's generated by guix system reconfigure.
https://gitlab.com/nonguix/nonguix/-/issues/33
I have ~/.config/guix/channels.scm generated by putting
home-channels-service-type in my guix home config.


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

end of thread, other threads:[~2024-05-08 23:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-07 16:05 The `channels' field of `operating-system' record Tomas Volf
2024-04-10 15:17 ` Ludovic Courtès
2024-04-15 22:04   ` Tomas Volf
2024-04-19 20:10     ` Ludovic Courtès
2024-05-08 23:16   ` Tomas Volf
  -- strict thread matches above, loose matches on Subject: below --
2024-04-09  4:06 Nathan Dehnel
2024-04-09  4:16 ` Marek Paśnikowski
2024-04-09 12:28   ` Tomas Volf
2024-04-09 12:29 ` Tomas Volf
2024-04-09 12:33 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.

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.