summary refs log tree commit diff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-09-28 10:19:26 +0000
committerMathieu Othacehe <othacehe@gnu.org>2021-10-02 10:54:41 +0000
commit245602604455ad9f48571af1fc9ecd6493f6e290 (patch)
treeaa251dfdecc3a00b8e00a430deed4c4b4716569d /gnu/system.scm
parent53a1cebc9bf6a0f5f8d8b3de84130c772b270082 (diff)
downloadguix-245602604455ad9f48571af1fc9ecd6493f6e290.tar.gz
system: Introduce the os-release file.
* gnu/system.scm (os-release): New procedure.
(operating-system-etc-service): Use it.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm16
1 files changed, 15 insertions, 1 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 69f2ae5786..80faaf9db8 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -852,6 +852,19 @@ syntactically correct."
                                "--check" "--file" #$file)
                        (copy-file #$file #$output)))))
 
+(define (os-release)
+  (plain-file "os-release"
+              "\
+NAME=\"Guix System\"
+ID=guix
+PRETTY_NAME=\"Guix System\"
+LOGO=guix-icon
+HOME_URL=\"https://guix.gnu.org\"
+DOCUMENTATION_URL=\"https://guix.gnu.org/en/manual\"
+SUPPORT_URL=\"https://guix.gnu.org/en/help\"
+BUG_REPORT_URL=\"https://lists.gnu.org/mailman/listinfo/bug-guix\"
+"))
+
 (define* (operating-system-etc-service os)
   "Return a <service> that builds a directory containing the static part of
 the /etc directory."
@@ -957,7 +970,8 @@ then
   source /run/current-system/profile/etc/profile.d/bash_completion.sh
 fi\n")))
     (etc-service
-     `(("services" ,(file-append net-base "/etc/services"))
+     `(("os-release" ,#~#$(os-release))
+       ("services" ,(file-append net-base "/etc/services"))
        ("protocols" ,(file-append net-base "/etc/protocols"))
        ("rpc" ,(file-append net-base "/etc/rpc"))
        ("login.defs" ,#~#$login.defs)