* Nested modify-services
@ 2023-06-04 19:53 Fredrik Salomonsson
2023-06-04 20:13 ` (
0 siblings, 1 reply; 3+ messages in thread
From: Fredrik Salomonsson @ 2023-06-04 19:53 UTC (permalink / raw)
To: help-guix
Hi Guix,
Yesterday I encountered an issue when I updated my desktop machine:
sudo -i guix pull && sudo -i guix system reconfigure ~/projects/plt/plt/system/machines/surt.scm
--8<----------------------------------------------------------------------------
…
guix system: warning: exception caught while executing 'eval' on service 'root':
error: remove: unbound variable
guix system: warning: some services could not be upgraded
hint: To allow changes to all the system services to take effect, you will need to reboot.
---------------------------------------------------------------------------->8--
But I didn't get that with my laptop. Both share a lot of the same
system configuration as I've created my own channel[0], where I have both
configs inherting from a common config. I traced the issue to how I was
setting up the extra services on my desktop machine[1]:
--8<----------------------------------------------------------------------------
(define plt-surt-os
(operating-system
(inherit %plt-base-operating-system)
(host-name "surt")
;; …
(services
(cons*
;; …
(service console-font-service-type
(map (lambda (tty)
(cons tty (file-append font-terminus "/share/consolefonts/ter-132n")))
'("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
(modify-services
%plt-base-services
(delete console-font-service-type))))))
---------------------------------------------------------------------------->8--
Where my %plt-base-services[2] is defined as:
--8<----------------------------------------------------------------------------
(define %plt-base-services
(cons*
(service plt-home-rottlog-service-type)
(service plt-automount-service-type)
;; …
(modify-services
%desktop-services
(delete gdm-service-type)
(network-manager-service-type
config => (network-manager-configuration
(inherit config)
(dns "dnsmasq")
(vpn-plugins (list network-manager-openconnect))))
;; …
)))
---------------------------------------------------------------------------->8--
If I remove the modify-services call on my desktop machine, or move it
to %plt-base-services. The error goes away. I noticed that
there was a recent change in modify-services[3] that is most likely
behind my issue.
Is nesting modify-services supported, I.e call modify-services on a list
that already been modified by modify-services? If not, what would be
the best way of sharing services between configurations and allow for
custom tweaks per machine.
Thanks!
[0] https://git.sr.ht/~plattfot/plt
[1] https://git.sr.ht/~plattfot/plt/tree/2abf21f5/item/plt/system/machines/surt.scm
[2] https://git.sr.ht/~plattfot/plt/tree/2abf21f5/item/plt/system/machines.scm
[3] https://git.savannah.gnu.org/cgit/guix.git/commit/?id=dbbc7e946131ba257728f1d05b96c4339b7ee88b
--
s/Fred[re]+i[ck]+/Fredrik/g
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Nested modify-services
2023-06-04 19:53 Nested modify-services Fredrik Salomonsson
@ 2023-06-04 20:13 ` (
2023-06-04 20:56 ` Fredrik Salomonsson
0 siblings, 1 reply; 3+ messages in thread
From: ( @ 2023-06-04 20:13 UTC (permalink / raw)
To: Fredrik Salomonsson; +Cc: help-guix
Fredrik Salomonsson <plattfot@posteo.net> writes:
> guix system: warning: exception caught while executing 'eval' on service 'root':
> error: remove: unbound variable
> guix system: warning: some services could not be upgraded
> hint: To allow changes to all the system services to take effect, you will need to reboot.
This appears to be unrelated to MODIFY-SERVICES. No idea what it
actually means, though, other than the obvious 'remove' being unbound...
> Is nesting modify-services supported, I.e call modify-services on a list
> that already been modified by modify-services?
It has to be. %BASE-SERVICES and %DESKTOP-SERVICES are themselves
constructed with MODIFY-SERVICES ^_^
-- (
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Nested modify-services
2023-06-04 20:13 ` (
@ 2023-06-04 20:56 ` Fredrik Salomonsson
0 siblings, 0 replies; 3+ messages in thread
From: Fredrik Salomonsson @ 2023-06-04 20:56 UTC (permalink / raw)
To: (; +Cc: help-guix
"(" <paren@disroot.org> writes:
> Fredrik Salomonsson <plattfot@posteo.net> writes:
>> guix system: warning: exception caught while executing 'eval' on service 'root':
>> error: remove: unbound variable
>> guix system: warning: some services could not be upgraded
>> hint: To allow changes to all the system services to take effect, you will need to reboot.
>
> This appears to be unrelated to MODIFY-SERVICES. No idea what it
> actually means, though, other than the obvious 'remove' being unbound...
Yeah, it could be totally unrelated. It is at least triggered when I
have nested modify-services. But could just be a red herring.
>> Is nesting modify-services supported, I.e call modify-services on a list
>> that already been modified by modify-services?
>
> It has to be. %BASE-SERVICES and %DESKTOP-SERVICES are themselves
> constructed with MODIFY-SERVICES ^_^
Ok, that's good :). Then at least I'm not using an unsopported
workflow[0].
[0] https://xkcd.com/1172/
--
s/Fred[re]+i[ck]+/Fredrik/g
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-04 20:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-04 19:53 Nested modify-services Fredrik Salomonsson
2023-06-04 20:13 ` (
2023-06-04 20:56 ` Fredrik Salomonsson
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.