From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: New reconfigure, creating a file under /etc Date: Mon, 7 Oct 2019 10:03:05 +0300 Message-ID: <20191007070305.GI561@E5400> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KjX7LgAomYr70Ka9" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38509) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHN32-0007Ht-9r for help-guix@gnu.org; Mon, 07 Oct 2019 03:03:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHN30-0000NE-Dt for help-guix@gnu.org; Mon, 07 Oct 2019 03:03:12 -0400 Received: from flashner.co.il ([178.62.234.194]:43642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iHN2y-0000Mp-I9 for help-guix@gnu.org; Mon, 07 Oct 2019 03:03:10 -0400 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: SuarezMiguelC Cc: "help-guix@gnu.org" --KjX7LgAomYr70Ka9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Here's the code I have for /etc/os-release. I defined %os-release-file at the top to keep my actual services list a bit shorter. The '@' notation is a short-cut to not need to actually import (guix packages) or (gnu packages package-management) in my config. Then later when adding the other services the 'simple-service' can just be added in and it'll be combined with the other 'etc-service-type' services to create a unified /etc. (define %os-release-file (plain-file "os-release" (string-append "NAME=3D\"Guix System\"\n" "PRETTY_NAME=3D\"Guix System\"\n" "VERSION=3D\""((@ (guix packages) package-version) (@ (gnu = packages package-management) guix))"\"\n" "ID=3Dguix\n" "HOME_URL=3D\"https://www.gnu.org/software/guix/\"\n" "SUPPORT_URL=3D\"https://www.gnu.org/software/guix/help/\"\= n" "BUG_REPORT_URL=3D\"mailto:bug-guix@gnu.org\"\n"))) (simple-service 'os-release etc-service-type `(("os-release" ,%os-release-file))) and here's what it looks like: efraim@E5400 ~$ cat /etc/os-release=20 NAME=3D"Guix System" PRETTY_NAME=3D"Guix System" VERSION=3D"1.0.1-6.0ed97e6" ID=3Dguix HOME_URL=3D"https://www.gnu.org/software/guix/" SUPPORT_URL=3D"https://www.gnu.org/software/guix/help/" BUG_REPORT_URL=3D"mailto:bug-guix@gnu.org" --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --KjX7LgAomYr70Ka9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl2a4yIACgkQQarn3Mo9 g1EYPQ//YHpTMV0HqkUYpMXNwxDhQvWa78ObJRmR2Wlbk9brKu7Iq5jCHnzO8Jhl ZEEBwBUZfTbv1DTo4tR77BdFO+aJzhr2W2/1OsflY1Tp6pEyzlIUbhuUj8zjnPkt HZcmlxt1Jbl3Geq4B7Z5w/SjPfUl8QbIlEZa+xbtIFCKFL++Y3DnPb41GvZJwLwU SCCeNVVlmRBiLGV2E2YxtngMt9gPX+si/XdDheny25Q3uBmL9CjsKEAJe9pRlqwo K5MBs28i5iWPeolIH1cbL2HtSFSPtykduh7GWC8fguhv9sedFfvxbfZFMLCAhCTp u1rrTqv+PMwZOibRpb6pHS6lH9VRzcugQK0EJ+Xt5kqyKQmdHh/39vwHNGjxG/zj Zf4rS3IaXge4XHnX+SDC/cyKiaJKtKE+ZXRO2Pnisu23rj4ex0gOu9XEu94Mzc0B YeMofpviG61JmEVduYwMRfel7W/7Myul6cmo3QlD9jJ7dWJSR0DLcmJlN8YKGySu wyfI7/VMWNoM9Xa/kOO8vl5kZvDym08FntpmJGpsIAhT5YVvA0un2ju7V2slA2E5 jczN8UE7bdh/i8pxAv4FTEpjtw3vs+T5rUonAHUe5lEISYoNPiFAtYCeA6eFF6LA w1VVnvvwShuezNjdk+9GqQnAutzGLqvoBAEZU+tHCPLzbiM9c/I= =VSKj -----END PGP SIGNATURE----- --KjX7LgAomYr70Ka9--