30 lines
509 B
Nix
30 lines
509 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
inputs,
|
|
config,
|
|
dots,
|
|
...
|
|
}:
|
|
{
|
|
options.custom = with lib; {
|
|
emacs = {
|
|
enable = mkEnableOption "Enable emacs";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.custom.emacs.enable {
|
|
home.packages = lib.mkIf pkgs.stdenv.isLinux (
|
|
with pkgs;
|
|
[
|
|
emacs
|
|
]
|
|
);
|
|
|
|
home.file.".emacs.d" = {
|
|
source = "${pkgs.custom.minimal-emacs-d}";
|
|
};
|
|
|
|
xdg.configFile."emacs".source = config.lib.file.mkOutOfStoreSymlink "${dots}/home/emacs/config";
|
|
};
|
|
}
|