38 lines
675 B
Nix
38 lines
675 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
config,
|
|
dots,
|
|
...
|
|
}:
|
|
{
|
|
options.custom = with lib; {
|
|
emacs = {
|
|
enable = mkEnableOption "Enable emacs";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.custom.emacs.enable {
|
|
home.packages =
|
|
with pkgs;
|
|
[
|
|
(aspellWithDicts (
|
|
dicts: with dicts; [
|
|
en
|
|
en-computers
|
|
en-science
|
|
]
|
|
))
|
|
ispell
|
|
]
|
|
++ lib.optionals pkgs.stdenv.isLinux [
|
|
emacs
|
|
];
|
|
|
|
# home.file.".emacs.d" = {
|
|
# source = "${pkgs.custom.minimal-emacs-d}";
|
|
# };
|
|
|
|
xdg.configFile."emacs".source = config.lib.file.mkOutOfStoreSymlink "${dots}/config/emacs";
|
|
};
|
|
}
|