literate-config

Literate config. See <a href="../readme.org">readme.org</a> for a better-formatted version
Log | Files | Refs

readme.org (2851B)


      1 #+title: Crazazy's literal config
      2 #+author: Crazazy
      3 #+PROPERTY: header-args :tangle yes :noweb yes :results silent
      4 #+INCLUDE: ./style.org
      5 This is my collection of literal config for my global and emacs setup you can =git clone= the org files at [[https://crazazy.tilde.cafe/literal-config.git][this link]]
      6 
      7 In this document I'm mostly going to set up some prerequisites for tangling other files and setting up dependencies
      8 * Maintenance links :noexport:
      9   This is for the org-mode side only
     10   It is assumed that you have nix and emacs installed for this config to work. You can tangle all files [[elisp:(dolist (i (directory-files (file-name-directory (buffer-file-name (current-buffer))) t "\\.org$")) (org-babel-tangle-file i))][with this lisp]]
     11   You can export all org files to html with a [[shell:(for i in *.org; do emacs -Q $i --batch --eval "(org-html-export-to-html)"; done; rm style.html*; scp *.html cafe:public_html/) &][this small script]]
     12   You can then install required dependencies with [[shell:./bootstrap.sh &][the bootstrap link]]
     13 * Dependencies
     14   Dependencies are handled by [[https://github.com/nmattia/niv][niv]]. I have put the dependencies in a shell file, rather than the output
     15   of niv itself, as I prefer that this configuration setup declares what I as a user would otherwise be doing
     16   by hand. Declarativity takes precendence over reproducibility here
     17 ** initialization
     18 
     19    First, we have to setup niv, you don't have to do anything here, as nix will just do everything for you
     20    #+begin_src sh :tangle bootstrap.sh :tangle-mode (identity #o755)
     21      #!/usr/bin/env nix-shell
     22      #!nix-shell -p niv -i bash
     23      niv init --no-nixpkgs
     24    #+end_src
     25 
     26    Then, we remove the default stuff that niv comes with by default
     27    #+begin_src sh :tangle bootstrap.sh
     28      niv drop niv
     29    #+end_src
     30 ** Adding dependencies
     31    Now it is time to actually add some dependencies into niv
     32 *** Emacs
     33     This dependency adds nix infrastructure for emacs that I wrote a while ago. better to add it as a dependency now
     34     #+begin_src sh :tangle bootstrap.sh
     35       niv add crazazy/emacs
     36     #+end_src
     37 *** NUR
     38     the [[https://github.com/nix-community/nur][Nix User Repository]] that contains my old config, and custom packages some people made
     39     #+begin_src sh :tangle bootstrap.sh
     40       niv add nix-community/NUR
     41     #+end_src
     42 *** emacs-ng
     43     I don't want to exactly lose track of this, so I'm going to include [[https://github.com/emacs-ng/emacs-ng][emacs-ng]] just incase
     44     #+begin_src sh :tangle bootstrap.sh
     45       niv add emacs-ng/emacs-ng
     46     #+end_src
     47 * Other stuff
     48   Other files that are available right now are [[file:nixos.org][the nixos config]] and [[file:emacs.org][the emacs config]]
     49   If you have any questions or comments about this repository, just HMU at [[mailto:crazazy@tilde.cafe][crazazy (at) tilde (dot) cafe]]