From 69a65a3d8f928c64cb9dcbbf0d9237525581a54a Mon Sep 17 00:00:00 2001 From: James Patrick Date: Mon, 13 Dec 2021 22:41:51 -0500 Subject: [PATCH] Added functional emacs --- modules/applications/default.nix | 3 ++- modules/applications/emacs.nix | 33 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 modules/applications/emacs.nix diff --git a/modules/applications/default.nix b/modules/applications/default.nix index c4f61eb..a620a9f 100644 --- a/modules/applications/default.nix +++ b/modules/applications/default.nix @@ -1,3 +1,4 @@ { config, pkgs, ... }: { - imports = [ ./firefox.nix ./mako.nix ./nextcloud.nix ./waybar.nix ]; + imports = + [ ./firefox.nix ./mako.nix ./nextcloud.nix ./waybar.nix ./emacs.nix ]; } diff --git a/modules/applications/emacs.nix b/modules/applications/emacs.nix new file mode 100644 index 0000000..c3c4b10 --- /dev/null +++ b/modules/applications/emacs.nix @@ -0,0 +1,33 @@ +{ inputs, config, lib, pkgs, ... }: +# TODO Still need the following dependecies +# - Language tools (grammer) +let cfg = config.application.emacs; +in with lib; { + options = { + application.emacs = { + enable = mkOption { + default = true; + type = with types; bool; + description = "Insert joke about emacs is an operating system."; + }; + }; + }; + + config = mkIf cfg.enable { + nixpkgs.overlays = [ inputs.emacs-overlay.overlay ]; + home-manager.users.james = { + programs.emacs = { + package = pkgs.emacsGcc; + enable = true; + extraPackages = epkgs: [ epkgs.vterm ]; + }; + + home.packages = with pkgs; [ + (aspellWithDicts (dicts: with dicts; [ en en-computers en-science ])) + ripgrep + sqlite + wordnet + ]; + }; + }; +}