summaryrefslogtreecommitdiff
path: root/common/modules/emacs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'common/modules/emacs/default.nix')
-rw-r--r--common/modules/emacs/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/common/modules/emacs/default.nix b/common/modules/emacs/default.nix
new file mode 100644
index 0000000..4566f57
--- /dev/null
+++ b/common/modules/emacs/default.nix
@@ -0,0 +1,33 @@
+{
+ homeManager,
+ inputs,
+ moduleNameSpace,
+ ...
+}:
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}:
+let
+ cfg = config.${moduleNameSpace}.emacs;
+in
+{
+ imports = lib.optionals homeManager [
+ inputs.nix-doom-emacs-unstraightened.homeModule
+ ];
+
+ options.${moduleNameSpace}.emacs = {
+ enable = lib.mkEnableOption "Enable emacs";
+ };
+
+ config = lib.mkIf cfg.enable (
+ lib.optionalAttrs homeManager {
+ programs.doom-emacs = {
+ enable = true;
+ doomDir = ./doom; # or e.g. `./doom.d` for a local configuration
+ };
+ }
+ );
+}