2021-04-11 00:25:36 +02:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.magic_rb.programs.emacs;
|
|
|
|
inherit (config.magic_rb.pkgs) nixpkgs;
|
|
|
|
in
|
2020-12-26 23:36:50 +01:00
|
|
|
{
|
2021-04-11 00:25:36 +02:00
|
|
|
options.magic_rb.programs.emacs = {
|
|
|
|
enable = mkEnableOption "Enable emacs with my config";
|
|
|
|
package = mkOption {
|
|
|
|
description = "Which emacs package to use.";
|
|
|
|
type = types.package;
|
|
|
|
default = nixpkgs.magic_rb.emacs;
|
2020-12-26 23:36:50 +01:00
|
|
|
};
|
2021-04-11 00:25:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
cfg.package
|
|
|
|
fira-code
|
|
|
|
emacs-all-the-icons-fonts
|
|
|
|
];
|
|
|
|
|
|
|
|
home.file = {
|
|
|
|
".emacs".source = ./.emacs;
|
|
|
|
".emacs.d/org" = {
|
|
|
|
source = ./.emacs.d/org;
|
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
".emacs.d/lisp" = {
|
|
|
|
source = ./.emacs.d/lisp;
|
|
|
|
recursive = true;
|
|
|
|
};
|
2020-12-26 23:36:50 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|