From a8dcbbefa623d6b4c2fa110cdf4bedaa0754f12c Mon Sep 17 00:00:00 2001 From: Alex David Date: Wed, 14 May 2025 09:37:30 -0700 Subject: [PATCH] Break time-zone into its own combinator --- combinators.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/combinators.nix b/combinators.nix index b773579..3dfbe4d 100644 --- a/combinators.nix +++ b/combinators.nix @@ -55,16 +55,19 @@ in rec { (readonly (noescape "/sys")) (unsafe-add-raw-args "--dev-bind /dev/dri /dev/dri") ]; - network = state: compose [ - (readonly "/etc/hosts") + time-zone = compose [ (unsafe-add-raw-args "--symlink \"$(readlink /etc/localtime)\" /etc/localtime") + (readonly "/etc/static/zoneinfo") + (readonly "/etc/zoneinfo") + ]; + network = state: compose [ + time-zone + (readonly "/etc/hosts") (readonly "/etc/nsswitch.conf") (readonly "/etc/resolv.conf") (readonly "/etc/ssl") (readonly "/etc/static/nsswitch.conf") (readonly "/etc/static/ssl") - (readonly "/etc/static/zoneinfo") - (readonly "/etc/zoneinfo") (write-text "/etc/hostname" "${state.hostname}\n") (unsafe-add-raw-args "--share-net --hostname ${escape state.hostname}") ] state;