Shaving MILLISECONDS off our startup time!!! Fuck yes!
I've measured the average startup time to be 0.68s in the previous commit, and an average of 0.52 with this commit.
Currently, we will just throw everything into modules/ and require it. As the
Emacs config grows in complexity, we can make the minor improvement to require
everything under glob modules/*.el without explicitly naming each feature.
Further, one could easily imagine a module system with conditionals and flags à
la Doom.
Every Nixy solution I could find or conceive had too many points spread across
these various facets:
- Flimsy (emacsWithPackagesFromUsePackage)
- Inelegant (builtins.exec, manual listings)
- Inflexible (emacsWithPackagesFromUsePackage)
- Otherwise unergonomic (everything }:D)
Straight.el is sufficiently declarative, flexible, and Nix-friendly without
blindly bowing down to the imperialist NixOS user. Now, Convenience and
ergonomics shan't be forsaken for the dogma that is total Nixation.
Working:
- The daemon
- Mutable config — well, kinda. I'm not yet sure how it will interact with
`emacsWithPackagesFromUsePackage`.
- Packages via Nixpkgs
Required a patch[1] to spec-dict. Something about GraalVM initialisation and
Clojure files without packages (i.e. single-level namespaced files). I don't
know!
[1]: 531d629b7f
Working:
- The daemon
- Mutable config — well, kinda. I'm not yet sure how it will interact with
`emacsWithPackagesFromUsePackage`.
- Packages via Nixpkgs
I had to disable initrd's systemd stuff. I just /couldn't/ get a rollback
service working; believe me, not for a lack of effort! I've been working on
this on-and-off for a month or two now.