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:
parent
7e10feb80d
commit
03a13ca1c2
2 changed files with 41 additions and 10 deletions
|
@ -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.
|
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
|
#+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
|
* 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.
|
Putting it all together to define the service for my home configuration.
|
||||||
|
|
||||||
#+begin_src scheme :noweb yes
|
#+begin_src scheme :noweb yes :noweb-ref services
|
||||||
(define oni-environment-servicee
|
(define oni-environment-service
|
||||||
(simple-service
|
(simple-service
|
||||||
'home-environment-service
|
'home-environment-service
|
||||||
home-environment-variables-service-type
|
home-environment-variables-service-type
|
||||||
'(
|
'(
|
||||||
<<environment-variables>>)))
|
<<environment-variables>>)))
|
||||||
#+end_src
|
#+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.
|
|
@ -25,7 +25,7 @@ The first topic I pay any attention to of course has to be [[file:emacs.org][Ema
|
||||||
|
|
||||||
* My literate configuration
|
* 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
|
* Topics
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue