jail.nix/lib/combinators/time-zone.nix
2025-10-14 19:38:49 -07:00

21 lines
429 B
Nix

{ combinators, ... }:
let
inherit (combinators)
add-runtime
include-once
;
in
{
sig = "Permission";
doc = ''
Exposes your timezone.
'';
impl = include-once "time-zone" (add-runtime ''
if [ -L /etc/localtime ]; then
RUNTIME_ARGS+=(
--ro-bind "$(realpath /etc/localtime)" "$(readlink /etc/localtime)"
--symlink "$(readlink /etc/localtime)" /etc/localtime
)
fi
'');
}