Fix time-zone combinator

Most software that wants to know the timezone reads the symlink in
`/etc/localtime`. A previous update broke this assumption when
attempting to fix the combinator to work on non-NixOS systems.

This change should fix the time-zone combinator in both NixOS and
non-NixOS systems.
This commit is contained in:
Alex David 2025-09-15 21:57:18 -07:00
commit 45c2b47d71
3 changed files with 51 additions and 1 deletions

View file

@ -860,7 +860,12 @@ rec {
doc = ''
Exposes your timezone.
'';
__functor = _: include-once "time-zone" (runtime-deep-ro-bind "/etc/localtime");
__functor =
_:
include-once "time-zone" (compose [
(unsafe-add-raw-args "--ro-bind \"$(realpath /etc/localtime)\" \"$(readlink /etc/localtime)\"")
(unsafe-add-raw-args "--symlink \"$(readlink /etc/localtime)\" /etc/localtime")
]);
};
network = {