blob: e41de4749bdb00715a9b9906ad74bf4f109d56aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
#+title: Dotfiles
#+author: Aryadev Chavali
#+description: README for Dotfiles
This repository contains all of my custom configurations for programs
I use daily.
* Setup instructions
1) Clone repository to =~/Dotfiles=
2) Construct the following directories:
+ =~/.local=
+ =src=
+ =bin=
+ =lib=
+ =share=
+ =~/.config=
+ =~/Downloads=
+ =~/Code=
+ =~/Media=
+ =~/Projects=
+ =~/Text=
3) Install [[https://www.gnu.org/software/stow/][GNU/stow]]
4) Go into the repository then pick which modules you want to install
+ To install a module use ~stow <module>~
+ To remove a module use ~stow -D <module>~
*NOTE*: GNU/Stow just symbolically links the internals of a module to
the home directory i.e. ~stow <module>~ just symlinks
=~/Dotfiles/<module>/*= to =~/*=. This is why the organisation of
each module is slightly weird.
This also means you don't need to follow step (3): you can just
perform the symlinks yourself if you wish.
* Emacs archives
On a fresh machine it takes a horrendous amount of time to completely
setup my Emacs configuration. This is largely due to /straight/ (the
package manager I use for Emacs) having to pull over 80 git
repositories for the different packages in my configuration, which is
obviously a network bound task. In comparison, it takes a much
shorter time to build the Lisp in these packages then load my
configuration.
Hence I've introduced this measure: a compressed archive of a minimal
viable configuration for Emacs. This contains my configuration files,
custom Lisp code, all the repositories for external packages I use and
the straight package cache. Instead of downloading each repository
individually, this archive contains all of them immediately.
On my current machine after downloading the archive it takes around
209s to completely build the system including both package and custom
Lisp compilation. Once this is done Emacs takes less than 1 second to
boot.
*NOTE*: This time doesn't include the native compilation time, as that
is asynchronous anyway.
** Scripts
*IMPORTANT*: These are heavy scripts, expect them to take a while.
Therefore, if in Emacs, do _not_ run these via ~C-c C-c~ because it
will block the main thread.
This script generates the archive:
#+begin_src sh
tar --use-compress-program="zstdmt -19 -T0" \
-cvf emacs-config.tar.zst \
~/.config/emacs/config.org \
~/.config/emacs/early-init.el \
~/.config/emacs/init.el \
~/.config/emacs/elisp/ \
~/.config/emacs/.config/custom.el \
~/.config/emacs/straight/versions/default.el \
~/.config/emacs/straight/repos/
#+end_src
And this script sends it over via rsync
#+begin_src sh
rsync -avz --info=progress2 --info=name0 emacs-config.tar.zst \
root@aryadevchavali.com:/var/www/html/resources
#+end_src
|