(address . guix-patches@gnu.org)
Currently GuixSD ships without an '/etc/os-release' file. This simple
service aims to correct this.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
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 <efraim@flashner.co.il>
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(+)
Toggle diff (34 lines)
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:bug-guix@gnu.org\"\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
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlxFnEQACgkQQarn3Mo9
g1EnjRAAkvxCLPzBnzylsjg6tmQbVKx/lYuDsk4CRQUAztBlT+viWsPxpmoeY6vz
9Y4nYQrDV5OrkoHg4OOv5Z8A/zFf2jjUZnDCFhut6UBmVzTIJgBdfA0o24m5CXZx
1arLiJmd8ZHYZFAP1y67nkDp/mn/dfP4AKd49eacuVTX9MBdrDL8hV1706WVsKHN
ISl77IKIrLtTWF0QiqTEmFI0B/yyf/V1600dH9vM6rNYlt1ZGUrMrmEVhJ5grpke
k2XJEuxsYVQJjXH831L1UxV0iV/C1yNUEHe0f2bhDdERVKNmjg9Tu4U9qS0KajNR
Pr8vJzgYjuUy9unDaDmqh8u0+qjxm8Dy5khfiHb/6JrrAyW4r/6yaAkocje3DgNL
SGgZXTk7SWHLywMVSeHkDOwvE9jSX06lhWoYaU2xs3Vp0k4UakUPt9rNwXW0Zajd
IbOoq7j62USxHXtGB06vyLBsyHvHCSZ6NmfltnkujzE7znDImolxqX0y5kChFUhP
/FrGmGj0A2o3Z0kBiiyaryzlgmuTY3219+ZFRhi052+8MEFbbhJqNS/jvMx7HBFp
reURJhiTPPDK+GqiXufshUT2Dr+yGNM7xvwKQbPbU8VF9qE0Bb/xWwgGkz7ow1Pd
fqYfHSpbh0Knhuz9/Y+K6C1t9dTod/2X2yTPeZwhCHC2C6lKl8o=
=jKVI
-----END PGP SIGNATURE-----