This commit is contained in:
Daniel Ziltener 2023-12-01 14:27:53 +01:00
parent 08b8d54061
commit 9d4b32fe67
Signed by: zilti
GPG key ID: B38976E82C9DAE42
3 changed files with 23 additions and 33 deletions

View file

@ -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
<<list-to-use(use-call="use-modules",entries=module-list)>>
#+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
<<list-to-use(use-call="use-service-modules",entries=service-module-list)>>
#+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
<<list-to-use(use-call="use-package-modules",entries=package-module-list)>>
#+end_src

View file

@ -1,5 +1,4 @@
(use-modules
(gnu)
(use-modules gnu
(gnu services base)
(gnu services dbus)
(gnu services desktop)
@ -10,21 +9,9 @@
(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"

View file

@ -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)
(let ((splits (split-string x)))
(if (length= splits 1)
(make-symbol (car splits))
(mapcar (lambda (y) (make-symbol y))
(split-string x)))
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)