From a4628dcf99c9f93094bb280bc32261909542af69 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:59:43 +0400 Subject: [PATCH] let the intrusive thoughts win --- config/emacs/.gitkeep | 0 hosts/sakotop/configuration.nix | 1 + modules/dev/editors/default.nix | 1 + modules/dev/editors/emacs/default.nix | 24 ++++++++++++++++++++++++ 4 files changed, 26 insertions(+) create mode 100644 config/emacs/.gitkeep create mode 100644 modules/dev/editors/emacs/default.nix diff --git a/config/emacs/.gitkeep b/config/emacs/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/hosts/sakotop/configuration.nix b/hosts/sakotop/configuration.nix index 783e3573..f8c45154 100644 --- a/hosts/sakotop/configuration.nix +++ b/hosts/sakotop/configuration.nix @@ -72,6 +72,7 @@ dev = { editors = { nvim.enable = true; + emacs.enable = true; }; nil.enable = true; cc.enable = true; diff --git a/modules/dev/editors/default.nix b/modules/dev/editors/default.nix index 7da21253..208e0099 100644 --- a/modules/dev/editors/default.nix +++ b/modules/dev/editors/default.nix @@ -2,5 +2,6 @@ imports = [ ./nvim ./vscode + ./emacs ]; } diff --git a/modules/dev/editors/emacs/default.nix b/modules/dev/editors/emacs/default.nix new file mode 100644 index 00000000..310e6290 --- /dev/null +++ b/modules/dev/editors/emacs/default.nix @@ -0,0 +1,24 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.dev.editors.emacs; +in +{ + options.modules.dev.editors.emacs = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + users.users.sako.packages = with pkgs; [ + # bro + direnv + # oh my days + emacs + ]; + home-manager.users.sako.home.file.".emacs.d" = { + enabled = true; + source = ../../../../config/emacs; + recursive = true; + }; + }; +}