2021-03-30 15:05:31 +04:00
|
|
|
{ pkgs, config, lib, inputs, ... }:
|
|
|
|
let
|
|
|
|
emacs = pkgs.emacsPgtk;
|
2021-04-22 19:12:54 +04:00
|
|
|
in {
|
2021-02-09 00:29:43 +04:00
|
|
|
# secrets-envsubst.emacs = {
|
2021-04-22 19:12:54 +04:00
|
|
|
# owner = "balsoft:users";
|
|
|
|
# directory = "emacs";
|
2021-02-09 00:29:43 +04:00
|
|
|
# };
|
2021-04-22 19:12:54 +04:00
|
|
|
|
2021-06-10 19:58:51 +04:00
|
|
|
persist.state.homeFiles =
|
|
|
|
[ ".config/emacs/custom" ".config/emacs/eshell/history" ];
|
2021-06-08 20:35:21 +04:00
|
|
|
|
2021-06-14 12:57:39 +04:00
|
|
|
defaultApplications.editor = {
|
2021-07-27 15:23:46 +04:00
|
|
|
cmd = toString (pkgs.writeShellScript "emacsclient-newwindow" ''
|
|
|
|
${config.home-manager.users.balsoft.programs.emacs.finalPackage}/bin/emacsclient -c "$@"
|
|
|
|
'');
|
2021-06-14 12:57:39 +04:00
|
|
|
desktop = "emacsclient";
|
|
|
|
};
|
|
|
|
|
2020-02-17 17:00:59 +04:00
|
|
|
home-manager.users.balsoft = {
|
|
|
|
programs.emacs = {
|
|
|
|
enable = true;
|
2021-03-30 15:05:31 +04:00
|
|
|
package = emacs;
|
2020-02-17 17:00:59 +04:00
|
|
|
extraPackages = epkgs:
|
|
|
|
with epkgs; [
|
|
|
|
use-package
|
|
|
|
nix-mode
|
|
|
|
haskell-mode
|
|
|
|
exec-path-from-shell
|
|
|
|
counsel
|
|
|
|
projectile
|
|
|
|
which-key
|
|
|
|
markdown-mode
|
|
|
|
frames-only-mode
|
|
|
|
company
|
|
|
|
rainbow-delimiters
|
|
|
|
diff-hl
|
|
|
|
mode-line-bell
|
|
|
|
flycheck
|
|
|
|
flycheck-pkg-config
|
|
|
|
auto-indent-mode
|
|
|
|
company-ghci
|
|
|
|
expand-region
|
|
|
|
ivy
|
|
|
|
smex
|
|
|
|
quickrun
|
|
|
|
counsel-tramp
|
|
|
|
ix
|
|
|
|
magit
|
|
|
|
arduino-mode
|
|
|
|
elixir-mode
|
2020-02-27 13:45:30 +04:00
|
|
|
company-box
|
2020-03-17 22:45:17 +04:00
|
|
|
ws-butler
|
2020-04-15 16:54:26 +04:00
|
|
|
yaml-mode
|
|
|
|
gitlab-ci-mode
|
|
|
|
gitlab-ci-mode-flycheck
|
|
|
|
gitlab
|
2020-07-16 17:46:49 +04:00
|
|
|
undo-tree
|
2020-09-14 02:36:22 +04:00
|
|
|
rust-mode
|
2020-10-18 14:28:27 +04:00
|
|
|
edit-indirect
|
2020-12-25 21:13:04 +04:00
|
|
|
idris-mode
|
2020-12-04 14:20:51 +04:00
|
|
|
lsp-mode
|
2021-02-28 20:06:01 +04:00
|
|
|
envrc
|
2021-03-01 14:04:17 +04:00
|
|
|
lsp-haskell
|
2021-05-08 02:22:06 +04:00
|
|
|
treemacs
|
|
|
|
lsp-treemacs
|
|
|
|
treemacs-projectile
|
|
|
|
dap-mode
|
2021-05-18 16:50:49 +04:00
|
|
|
forge
|
2021-05-25 15:04:21 +04:00
|
|
|
crdt
|
2021-06-10 19:58:51 +04:00
|
|
|
base16-theme
|
2021-07-30 14:15:18 +04:00
|
|
|
org-caldav
|
2021-10-29 19:51:45 +04:00
|
|
|
evil
|
2021-11-28 19:07:13 +04:00
|
|
|
tuareg
|
2021-11-30 16:04:22 +04:00
|
|
|
fira-code-mode
|
2021-12-07 15:10:24 +04:00
|
|
|
terraform-mode
|
2020-02-17 17:00:59 +04:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2021-04-22 19:12:54 +04:00
|
|
|
home.packages = [ pkgs.clang ];
|
2020-02-17 17:00:59 +04:00
|
|
|
|
|
|
|
services.emacs.enable = true;
|
|
|
|
|
2021-07-24 02:23:37 +04:00
|
|
|
systemd.user.services.emacs = {
|
|
|
|
Service = {
|
|
|
|
Environment =
|
|
|
|
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/balsoft/bin";
|
2021-09-23 21:13:38 +04:00
|
|
|
};
|
2021-10-23 20:48:36 +04:00
|
|
|
Unit.After = [ "sway-session.target" ];
|
2021-09-23 21:13:38 +04:00
|
|
|
Install = {
|
|
|
|
WantedBy = lib.mkForce [ "sway-session.target" ];
|
2021-07-24 02:23:37 +04:00
|
|
|
};
|
|
|
|
};
|
2020-02-17 17:00:59 +04:00
|
|
|
|
2021-06-10 19:58:51 +04:00
|
|
|
xdg.configFile."emacs/init.el".source = pkgs.substituteAll ({
|
|
|
|
src = ./init.el;
|
|
|
|
font = with config.themes.fonts; "${mono.family} ${toString mono.size}";
|
|
|
|
} // pkgs.my-lib.thmHash);
|
2020-02-17 17:00:59 +04:00
|
|
|
};
|
|
|
|
}
|