From a144093227c6bfd5891f7fc422bb0dabd531142c Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Tue, 1 Jul 2025 16:20:52 +0800 Subject: [PATCH] feat: allow to modify /etc/hosts for testing --- modules/nixos/base/networking.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixos/base/networking.nix b/modules/nixos/base/networking.nix index 733c2bb0..33830355 100644 --- a/modules/nixos/base/networking.nix +++ b/modules/nixos/base/networking.nix @@ -18,4 +18,8 @@ "ntp.aliyun.com" # Aliyun NTP Server "ntp.tencent.com" # Tencent NTP Server ]; + + # dynamically update /etc/hosts for testing + # Note that changes made in this way will be discarded when switching configurations. + environment.etc.hosts.mode = "0644"; }