guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 573abbcf4dd5620ef69c2ce617becbb33d47ea9f
Author: Yelninei <[email protected]>
AuthorDate: Sat Nov 7 22:42:45 2026 +0000
system: Let libc manage the hostname on the Hurd.
* gnu/system.scm (hurd-default-essential-services):
Add host-name-service-type.
(operating-system-etc-services):
Don't create/etc/hostname on the Hurd.
Fixes: https://codeberg.org/guix/guix/issues/12364
Merges: https://codeberg.org/guix/guix/pulls/12370
Signed-off-by: Nguyễn Gia Phong <[email protected]>
---
gnu/system.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index ee238be4b0c..fa92848cf07 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -906,6 +906,7 @@ bookkeeping."
(list `("hosts" ,hosts-file)))
(service hosts-service-type
(local-host-entries host-name)))
+ (service host-name-service-type host-name)
(service profile-service-type (operating-system-packages os))
(swap-services os))))
@@ -1188,7 +1189,11 @@ fi
;; NetworkManager from changing the system's hostname when connecting
;; to certain networks. Some discussion at
;; https://lists.gnu.org/archive/html/help-guix/2017-09/msg00037.html
- ("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
+ ;; On the Hurd /etc/hostname is the location where hostname information
+ ;; is stored, so it cannot be a store symlink.
+ ,@(if hurd
+ '()
+ `(("hostname" ,(plain-file "hostname" (operating-system-host-name
os)))))
;; Some programs (e.g., GLib) look at /etc/timezone to find the
;; name of the current timezone. For details, see
;; https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00166.html