From 9d4b32fe678eef8d04a9c57544cb3620b0f7763e Mon Sep 17 00:00:00 2001 From: Daniel Ziltener Date: Fri, 1 Dec 2023 14:27:53 +0100 Subject: [PATCH] . --- config.org | 6 +++--- config.scm | 37 ++++++++++++------------------------- library.org | 13 ++++++++----- 3 files changed, 23 insertions(+), 33 deletions(-) diff --git a/config.org b/config.org index 7e98856..78fa974 100644 --- a/config.org +++ b/config.org @@ -20,7 +20,7 @@ - gnu services xorg - gnu system nss -#+begin_src scheme :noweb yes :exports none :results code :tangle config.scm +#+begin_src scheme :noweb yes :exports none :results code pp :tangle config.scm <> #+end_src @@ -30,7 +30,7 @@ - desktop - xorg -#+begin_src scheme :noweb yes :exports none :results code :tangle config.scm +#+begin_src scheme :noweb yes :exports none :results code pp :tangle config.scm <> #+end_src @@ -48,7 +48,7 @@ - wm - xorg -#+begin_src scheme :noweb yes :exports none :results code :tangle config.scm +#+begin_src scheme :noweb yes :exports none :results code pp :tangle config.scm <> #+end_src diff --git a/config.scm b/config.scm index a3d78df..aa98fc0 100644 --- a/config.scm +++ b/config.scm @@ -1,30 +1,17 @@ -(use-modules - (gnu) - (gnu services base) - (gnu services dbus) - (gnu services desktop) - (gnu services linux) - (gnu services networking) - (gnu services pm) - (gnu services virtualization) - (gnu services xorg) - (gnu system nss)) +(use-modules gnu + (gnu services base) + (gnu services dbus) + (gnu services desktop) + (gnu services linux) + (gnu services networking) + (gnu services pm) + (gnu services virtualization) + (gnu services xorg) + (gnu system nss)) -(use-service-modules - (desktop) - (xorg)) +(use-service-modules desktop xorg) -(use-package-modules - (bootloaders) - (certs) - (emacs) - (emacs-xyz) - (fonts) - (readline) - (terminals) - (version-control) - (wm) - (xorg)) +(use-package-modules bootloaders certs emacs emacs-xyz fonts readline terminals version-control wm xorg) (define %local-filesystem (call-with-input-file "/etc/config.scm" diff --git a/library.org b/library.org index 93a24bd..07e1036 100644 --- a/library.org +++ b/library.org @@ -7,18 +7,21 @@ This library contains code blocks to be used by other files in this repository. Converting org lists into guix ~use-~ calls. #+NAME: list-to-use -#+begin_src emacs-lisp :var use-call="use-modules" :var entries='() :results code +#+begin_src emacs-lisp :var use-call="use-modules" :var entries='() :results code pp `(,(make-symbol use-call) ,@(mapcar (lambda (x) - (mapcar (lambda (y) (make-symbol y)) - (split-string x))) + (let ((splits (split-string x))) + (if (length= splits 1) + (make-symbol (car splits)) + (mapcar (lambda (y) (make-symbol y)) + splits)))) entries)) #+end_src Converting Org lists into Scheme symbol lists. #+NAME: org-to-scheme-sym-list -#+begin_src emacs-lisp :var input='() :results code +#+begin_src emacs-lisp :var input='() :results code pp `(list ,@(mapcar (lambda (x) (make-symbol x)) input)) #+end_src @@ -26,7 +29,7 @@ Converting Org lists into Scheme symbol lists. * Converting Tables #+NAME: service-converter -#+begin_src emacs-lisp :var input='() :colnames yes :results code +#+begin_src emacs-lisp :var input='() :colnames yes :results code pp `(list ,@(mapcar (lambda (row)