summaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorThomas Danckaert <thomas.danckaert@gmail.com>2017-09-16 13:54:40 +0200
committerThomas Danckaert <thomas.danckaert@gmail.com>2017-09-19 15:39:32 +0200
commitc694520bb13ef11c11c06cbc52e1dc27c24dc788 (patch)
tree8fa3f981f862df10b336844e67b40740bca1c082 /gnu/system.scm
parent3daea4f12b4c9fa48d4a964ee2d9e3d1de349054 (diff)
downloadpatches-c694520bb13ef11c11c06cbc52e1dc27c24dc788.tar
patches-c694520bb13ef11c11c06cbc52e1dc27c24dc788.tar.gz
system: Create "/etc/hostname".
* gnu/system.scm (operating-system-etc-service): Add a plain-file with the operating-system-host-name.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index d337e52593..88b5346797 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -646,6 +646,11 @@ fi\n")))
("bashrc" ,#~#$bashrc)
("hosts" ,#~#$(or (operating-system-hosts-file os)
(default-/etc/hosts (operating-system-host-name os))))
+ ;; Write the operating-system-host-name to /etc/hostname to prevent
+ ;; 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)))
("localtime" ,(file-append tzdata "/share/zoneinfo/"
(operating-system-timezone os)))
("sudoers" ,(operating-system-sudoers-file os))))))