# Pastebin L81kCpk2 let myEmacs = pkgs.emacsPackagesNg.emacsWithPackages (self: with self; [ ... ]); in { environment.systemPackages = [ myEmacs ]; services.emacs = { enable = true; package = myEmacs; }; }