Subject: [PATCH] /etc/os-release

From: Efraim Flashner <[email-masked]>
Date: Mon, 21 Jan 2019 12:17:40 +0200

Currently GuixSD ships without an '/etc/os-release' file. This simple
service aims to correct this.

-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
From 57918a48ee7c649470ab20cb7337bc5528df515e Mon Sep 17 00:00:00 2001
From: Efraim Flashner <[email-masked]>
Date: Mon, 21 Jan 2019 12:16:31 +0200
Subject: [PATCH] services: Add os-release-file.

* gnu/services/base.scm (%os-release-file): New variable.
(%base-services): Add it.
---
 gnu/services/base.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index d2baea0dd..7af3142cf 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -2294,6 +2294,17 @@ to handle."
                                            (requirement requirement)
                                            (name-servers name-servers)))))
 
+(define %os-release-file
+  (plain-file "os-release"
+              (string-append
+                "NAME=\"GNU Guix\"\n"
+                "PRETTY_NAME=\"GNU Guix\"\n"
+                "VERSION=\""((@ (guix packages) package-version) guix)"\"\n"
+                "ID=guix\n"
+                "HOME_URL=\"https://www.gnu.org/software/guix/\"\n"
+                "SUPPORT_URL=\"https://www.gnu.org/software/guix/help/\"\n"
+                "BUG_REPORT_URL=\"mailto:[email-masked]\"\n")))
+
 
 (define %base-services
   ;; Convenience variable holding the basic services.
@@ -2340,6 +2351,9 @@ to handle."
                  (udev-configuration
                    (rules (list lvm2 fuse alsa-utils crda))))
 
+        (service special-files-service-type
+                 `(("/etc/os-release" ,%os-release-file)))
+
         (service special-files-service-type
                  `(("/bin/sh" ,(file-append (canonical-package bash)
                                             "/bin/sh"))))))
-- 
2.20.1