~ruther/guix-local

c694520bb13ef11c11c06cbc52e1dc27c24dc788 — Thomas Danckaert 8 years ago 3daea4f
system: Create "/etc/hostname".

* gnu/system.scm (operating-system-etc-service): Add a plain-file with the
  operating-system-host-name.
1 files changed, 5 insertions(+), 0 deletions(-)

M gnu/system.scm
M gnu/system.scm => gnu/system.scm +5 -0
@@ 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))))))