Make my configuration able to set itself up

Executing the first code block in the file will get the configuration up and
running.

Also rename ‘config/index.org’ to ‘config/rincewind.org’ because for now this is
the only literate configuration I have, but it won't be forever.
This commit is contained in:
Tom Willemse 2022-11-17 00:12:25 -08:00
parent 7e10feb80d
commit 03a13ca1c2
2 changed files with 41 additions and 10 deletions

View file

@ -8,10 +8,20 @@ This is my latest attempt at a literate configuration.
This is in the very early stages of an attempt to do this. And usually I get frustrated and give up quite early on. I'll try and get small bits and pieces in here one at a time.
#+end_note
Here is the command that converts this file into my home configuration. This calls [[file:../guix.org][Guix]] shell with /just/ the =emacs-next= package installed and runs [[file:../emacs.org][Emacs]] to tangle this file. When tangling is done it runs guix home to configure my environment.
# * TODO Write a config.scm that tangles this file and loads the result
#+begin_note
For the moment this doesn't do ~guix home reconfigure~ but ~guix home build~ instead. I'm still getting this up to the point where I can actually use it.
#+end_note
# * TODO Make all of this tangle into an actual file
#+begin_src sh :results silent
guix shell --pure emacs-next -- emacs \
-quick -batch \
-load ob-tangle \
-visit rincewind.org \
-funcall org-babel-tangle
guix home build rincewind.scm
#+end_src
* Environment
@ -69,11 +79,32 @@ I was working with =git= recently, splitting some utilities out into their own r
Putting it all together to define the service for my home configuration.
#+begin_src scheme :noweb yes
(define oni-environment-servicee
#+begin_src scheme :noweb yes :noweb-ref services
(define oni-environment-service
(simple-service
'home-environment-service
home-environment-variables-service-type
'(
<<environment-variables>>)))
#+end_src
* Home
This brings it all together. The =<<services>>= is where all the services defined throughout this document are placed, and the last few lines return my home environment.
#+begin_src scheme :tangle rincewind.scm :noweb tangle
(use-modules
(gnu services)
(gnu home services))
<<services>>
(home-environment
(services
(list
oni-environment-service)))
#+end_src
* Changelog
- [2022-11-16 Wed] :: Added a code block that tries to tangle this file and then build the result. And made the output an actual home environment.

View file

@ -25,7 +25,7 @@ The first topic I pay any attention to of course has to be [[file:emacs.org][Ema
* My literate configuration
Every so often I get really drawn to remaking my entire configuration into a [[file:literate-programming.org][Literate Programming]] style. See my [[file:config/index.org][latest attempt]].
Every so often I get really drawn to remaking my entire configuration into a [[file:literate-programming.org][Literate Programming]] style. See my [[file:config/rincewind.org][latest attempt]].
* Topics