{ cfg, ... }: # let # # Create an emacs module with a single file in it # loadModule = (file: pkgs.runCommand "${file}" {} '' # mkdir -p $out/share/emacs/site-lisp # cp -v ${file} $out/share/emacs/site-lisp/ # ''); # # Create a full config from a set of # buildConfig = (anchor: modules: pkgs.symlinkJoin { # name = "libkookie-emacs"; # paths = modules ++ [ (loadModule "${anchor}") ]; # }); # in # (buildConfig "default.el" cfg.libkookie.features) {}