Subject: [bug#75145] [PATCH v2 0/1] services: network-manager: Add extra-configuration-files field.

From: Arnaud Daby-Seesaram <[email-masked]>
Date: Sat, 18 Jan 2025 22:13:58 +0100

Hi,

I apologise for the late answer.

45mg <[email-masked]> writes:
> Arnaud Daby-Seesaram <[email-masked]> writes:
>> As you said, you are doing something similar to `etc-service-type'.  Is
>> there a reason not to extend [2] it directly (e.g. like
>> `greetd-service-type' does in `(gnu services base)')?
>>
>> You could, for example, prepend "NetworkManager/conf.d/" to file names
>> and pass the value to `etc-service-type'.  WDYT?
>
> [...]
>
> When we use `etc-service-type`, "/etc/NetworkManager" becomes a symlink
> to "/etc/static/NetworkManager"; and "/etc/static" is a symlink to the
> result of building the derivation returned by `etc-entry` (see (gnu
> services)). And derivations are in the store, which is read-only. So we
> can't create "/etc/NetworkManager/system-connections/". And this won't
> do, since NetworkManager itself needs to be able to write to that
> directory to manage saved connections.
>
> So it looks like that won't work.

That is unfortunate; thank you for trying it out!

Re-reading your patch and the implementation of `etc-service-type',
maybe `network-manager-configuration-directory' could be replaced by
`file-union' defined in `(guix gexp)', WDYT?

Otherwise, your patch seems good to me :).  I will let others comment
and give their opinion.

Best regards,

-- 
Arnaud