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 services xorg
- gnu system nss - 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)>> <<list-to-use(use-call="use-modules",entries=module-list)>>
#+end_src #+end_src
@ -30,7 +30,7 @@
- desktop - desktop
- xorg - 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)>> <<list-to-use(use-call="use-service-modules",entries=service-module-list)>>
#+end_src #+end_src
@ -48,7 +48,7 @@
- wm - wm
- xorg - 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)>> <<list-to-use(use-call="use-package-modules",entries=package-module-list)>>
#+end_src #+end_src

View file

@ -1,30 +1,17 @@
(use-modules (use-modules gnu
(gnu) (gnu services base)
(gnu services base) (gnu services dbus)
(gnu services dbus) (gnu services desktop)
(gnu services desktop) (gnu services linux)
(gnu services linux) (gnu services networking)
(gnu services networking) (gnu services pm)
(gnu services pm) (gnu services virtualization)
(gnu services virtualization) (gnu services xorg)
(gnu services xorg) (gnu system nss))
(gnu system nss))
(use-service-modules (use-service-modules desktop xorg)
(desktop)
(xorg))
(use-package-modules (use-package-modules bootloaders certs emacs emacs-xyz fonts readline terminals version-control wm xorg)
(bootloaders)
(certs)
(emacs)
(emacs-xyz)
(fonts)
(readline)
(terminals)
(version-control)
(wm)
(xorg))
(define %local-filesystem (define %local-filesystem
(call-with-input-file "/etc/config.scm" (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. Converting org lists into guix ~use-~ calls.
#+NAME: list-to-use #+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) `(,(make-symbol use-call)
,@(mapcar (lambda (x) ,@(mapcar (lambda (x)
(mapcar (lambda (y) (make-symbol y)) (let ((splits (split-string x)))
(split-string x))) (if (length= splits 1)
(make-symbol (car splits))
(mapcar (lambda (y) (make-symbol y))
splits))))
entries)) entries))
#+end_src #+end_src
Converting Org lists into Scheme symbol lists. Converting Org lists into Scheme symbol lists.
#+NAME: org-to-scheme-sym-list #+NAME: org-to-scheme-sym-list
#+begin_src emacs-lisp :var input='() :results code #+begin_src emacs-lisp :var input='() :results code pp
`(list `(list
,@(mapcar (lambda (x) (make-symbol x)) input)) ,@(mapcar (lambda (x) (make-symbol x)) input))
#+end_src #+end_src
@ -26,7 +29,7 @@ Converting Org lists into Scheme symbol lists.
* Converting Tables * Converting Tables
#+NAME: service-converter #+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 `(list
,@(mapcar ,@(mapcar
(lambda (row) (lambda (row)