Install emacs.nix

- To avoid having to configure emacs I'll be using spacemacs
- Emacs is now only used for my EPQ. I'm probably going to be disabling it later
- As spacemacs needs to write its configuration during the setup, I'll have to
  do it imperatively
diff --git a/config.nix b/config.nix
new file mode 100644
index 0000000..3eeeca0
--- /dev/null
+++ b/config.nix
@@ -0,0 +1,3 @@
+{
+  emacs.enable = true;
+}
diff --git a/modules/emacs.nix b/modules/emacs.nix
new file mode 100644
index 0000000..b0ed74c
--- /dev/null
+++ b/modules/emacs.nix
@@ -0,0 +1,21 @@
+{
+  pkgs,
+  config,
+  username,
+  lib,
+  ...
+}: let
+  cfg = config.minion.emacs;
+in {
+  options.minion.emacs.enable = lib.mkEnableOption "Enable emacs";
+
+  config = {
+    environment.persistence."/nix/persist".users.${username}.directories = [".emacs.d"];
+  };
+
+  home.programs.emacs.enable = true;
+
+  traces = [
+    "home.programs.emacs.enable"
+  ];
+}