.
This commit is contained in:
parent
5fd0737748
commit
75e8c9aaa9
4 changed files with 103 additions and 36 deletions
|
@ -1,3 +1,4 @@
|
|||
((nil . ((geiser-scheme-implementation . guile)
|
||||
(geiser-guile-binary . ("guix" "repl"))))
|
||||
;;(geiser-guile-binary . ("guix" "repl"))
|
||||
))
|
||||
(org-mode . ((org-confirm-babel-evaluate . nil))))
|
||||
|
|
16
config.org
16
config.org
|
@ -1,7 +1,7 @@
|
|||
#+TITLE: GUIX System Configuration
|
||||
#+AUTHOR: Daniel Ziltener
|
||||
#+PROPERTY: scheme-implementation guile
|
||||
#+PROPERTY: header-args:scheme :comments both
|
||||
#+PROPERTY: header-args:scheme :comments both :session *guile*
|
||||
|
||||
#+begin_src emacs-lisp :results none
|
||||
(org-babel-lob-ingest "./library.org")
|
||||
|
@ -53,7 +53,7 @@ This is to be run after setting up the partitions.
|
|||
- nongnu packages linux
|
||||
- nongnu system linux-initrd
|
||||
|
||||
#+begin_src scheme :noweb yes :exports none :results code pp :tangle config.scm
|
||||
#+begin_src scheme :noweb yes :exports none :results output :tangle config.scm
|
||||
<<list-to-use(use-call="use-modules",entries=module-list,all-parens=1)>>
|
||||
#+end_src
|
||||
|
||||
|
@ -63,10 +63,12 @@ This is to be run after setting up the partitions.
|
|||
- desktop
|
||||
- xorg
|
||||
|
||||
#+begin_src scheme :noweb yes :exports none :results code pp :tangle config.scm
|
||||
#+begin_src scheme :noweb yes :exports none :results output :tangle config.scm
|
||||
<<list-to-use(use-call="use-service-modules",entries=service-module-list)>>
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
||||
** Package Modules
|
||||
|
||||
#+NAME: package-module-list
|
||||
|
@ -82,7 +84,7 @@ This is to be run after setting up the partitions.
|
|||
- wm
|
||||
- xorg
|
||||
|
||||
#+begin_src scheme :noweb yes :exports none :results code pp :tangle config.scm
|
||||
#+begin_src scheme :noweb yes :exports none :results output :tangle config.scm
|
||||
<<list-to-use(use-call="use-package-modules",entries=package-module-list)>>
|
||||
#+end_src
|
||||
|
||||
|
@ -103,6 +105,8 @@ The variable ~%local-filesystem~ extracts the file system definitions from the i
|
|||
(interaction-environment)))))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
||||
As a sibling to the former, the variable ~%local-swap~ does the same with the swap partition.
|
||||
|
||||
#+begin_src scheme :tangle config.scm
|
||||
|
@ -157,6 +161,8 @@ This adds the Nonguix channel.
|
|||
%base-packages))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS: root-package-block
|
||||
|
||||
** Services
|
||||
|
||||
#+NAME: root-services-block
|
||||
|
@ -189,7 +195,7 @@ These services are unmodified, or have just few settings.
|
|||
| fprintd | () |
|
||||
|
||||
#+NAME: root-simple-service-block
|
||||
#+begin_src scheme :noweb yes :exports none :results code
|
||||
#+begin_src scheme :noweb yes :exports none :results output
|
||||
<<service-converter(input=root-simple-services)>>
|
||||
#+end_src
|
||||
|
||||
|
|
56
config.scm
56
config.scm
|
@ -18,7 +18,20 @@
|
|||
|
||||
|
||||
;; [[file:config.org::*Modules][Modules:1]]
|
||||
nil
|
||||
(use-modules (gnu)
|
||||
(gnu image)
|
||||
(gnu services authentication)
|
||||
(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)
|
||||
(nongnu packages linux)
|
||||
(nongnu system linux-initrd))
|
||||
;; Modules:1 ends here
|
||||
|
||||
;; Service Modules
|
||||
|
@ -29,7 +42,7 @@ nil
|
|||
|
||||
|
||||
;; [[file:config.org::*Service Modules][Service Modules:1]]
|
||||
nil
|
||||
(use-service-modules desktop xorg)
|
||||
;; Service Modules:1 ends here
|
||||
|
||||
;; Package Modules
|
||||
|
@ -49,7 +62,17 @@ nil
|
|||
|
||||
|
||||
;; [[file:config.org::*Package Modules][Package Modules:1]]
|
||||
nil
|
||||
(use-package-modules bootloaders
|
||||
certs
|
||||
emacs
|
||||
emacs-xyz
|
||||
fonts
|
||||
pciutils
|
||||
readline
|
||||
terminals
|
||||
version-control
|
||||
wm
|
||||
xorg)
|
||||
;; Package Modules:1 ends here
|
||||
|
||||
;; File System
|
||||
|
@ -70,6 +93,8 @@ nil
|
|||
|
||||
|
||||
|
||||
;; #+RESULTS:
|
||||
|
||||
;; As a sibling to the former, the variable ~%local-swap~ does the same with the swap partition.
|
||||
|
||||
|
||||
|
@ -121,7 +146,13 @@ nil
|
|||
%base-user-accounts))
|
||||
(packages
|
||||
(append
|
||||
nil
|
||||
(list emacs
|
||||
emacs-desktop-environment
|
||||
font-terminus
|
||||
git
|
||||
hwdata
|
||||
nss-certs
|
||||
readline)
|
||||
%base-packages))
|
||||
(services
|
||||
(append
|
||||
|
@ -138,7 +169,22 @@ nil
|
|||
(authorized-keys
|
||||
(append (list (plain-file "non-guix.pub"
|
||||
"<<nonguix-pubkey>>")))))))
|
||||
nil
|
||||
(list
|
||||
(service tlp-service-type)
|
||||
(service thermald-service-type
|
||||
(thermald-configuration
|
||||
(adaptive? #t)))
|
||||
(service bluetooth-service-type)
|
||||
(service earlyoom-service-type
|
||||
(earlyoom-configuration
|
||||
(minimum-available-memory 5)
|
||||
(minimum-free-swap 5)))
|
||||
(service inputattach-service-type)
|
||||
(service libvirt-service-type
|
||||
(libvirt-configuration
|
||||
(unix-sock-group "libvirt")))
|
||||
(service fstrim-service-type)
|
||||
(service fprintd-service-type))
|
||||
(list
|
||||
(service greetd-service-type
|
||||
(greetd-configuration
|
||||
|
|
28
library.org
28
library.org
|
@ -1,5 +1,5 @@
|
|||
# -*- geiser-scheme-implementation: guile -*-
|
||||
#+TITLE: Babel Library
|
||||
#+PROPERTY: header-args:scheme: :session *guile* :prologue "(use-modules (ice-9 pretty-print))"
|
||||
|
||||
This library contains code blocks to be used by other files in this repository.
|
||||
|
||||
|
@ -8,7 +8,8 @@ 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 scheme :var use-call="use-modules" :var entries='() :var all-parens=0 :results code pp
|
||||
#+begin_src scheme :var use-call="use-modules" :var entries='() :var all-parens=0 :results output
|
||||
(pretty-print
|
||||
`(,(string->symbol use-call)
|
||||
,@(map (lambda (x)
|
||||
(let ((splits (string-split x #\ )))
|
||||
|
@ -17,21 +18,34 @@ Converting org lists into guix ~use-~ calls.
|
|||
(string->symbol (car splits))
|
||||
(map (lambda (y) (string->symbol y))
|
||||
splits))))
|
||||
entries))
|
||||
entries)))
|
||||
#+end_src
|
||||
|
||||
Converting Org lists into Scheme symbol lists.
|
||||
|
||||
#+NAME: sym-list-sample
|
||||
- Entry 1
|
||||
- Entry 2
|
||||
|
||||
#+NAME: org-to-scheme-sym-list
|
||||
#+begin_src scheme :var input='() :results code pp
|
||||
#+begin_src scheme :var input=sym-list-sample :results output
|
||||
(pretty-print
|
||||
`(list
|
||||
,@(map (lambda (x) (string->symbol x)) input))
|
||||
,@(map (lambda (x) (string->symbol x)) input)))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS: org-to-scheme-sym-list
|
||||
: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
|
||||
: Wrong type to apply: "Entry 1"
|
||||
:
|
||||
: Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
|
||||
: scheme@(guile-user) [1]>
|
||||
|
||||
* Converting Tables
|
||||
|
||||
#+NAME: service-converter
|
||||
#+begin_src scheme :var input='() :colnames yes :results code pp
|
||||
#+begin_src scheme :var input='() :colnames yes :results code
|
||||
(pretty-print
|
||||
`(list
|
||||
,@(map
|
||||
(lambda (row)
|
||||
|
@ -41,5 +55,5 @@ Converting Org lists into Scheme symbol lists.
|
|||
(,(string->symbol (string-append service-name "-configuration"))
|
||||
,@(call-with-input-string configuration
|
||||
read)))))
|
||||
input))
|
||||
input)))
|
||||
#+end_src
|
||||
|
|
Loading…
Reference in a new issue