[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New reconfigure, creating a file under /etc
From: |
Efraim Flashner |
Subject: |
Re: New reconfigure, creating a file under /etc |
Date: |
Mon, 7 Oct 2019 10:03:05 +0300 |
User-agent: |
Mutt/1.12.2 (2019-09-21) |
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=\"Guix System\"\n"
"PRETTY_NAME=\"Guix System\"\n"
"VERSION=\""((@ (guix packages) package-version) (@ (gnu
packages package-management) 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:address@hidden\"\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
NAME="Guix System"
PRETTY_NAME="Guix System"
VERSION="1.0.1-6.0ed97e6"
ID=guix
HOME_URL="https://www.gnu.org/software/guix/"
SUPPORT_URL="https://www.gnu.org/software/guix/help/"
BUG_REPORT_URL="mailto:address@hidden"
--
Efraim Flashner <address@hidden> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
signature.asc
Description: PGP signature