2024-09-30 07:15:20 +04:00
|
|
|
{ outputs, options, config, lib, pkgs, inputs, ... }:
|
2024-08-01 16:24:09 +04:00
|
|
|
let
|
2023-09-16 11:52:57 +04:00
|
|
|
cfg = config.modules.dev.editors.emacs;
|
2024-02-04 10:16:07 +04:00
|
|
|
|
2024-10-13 14:46:37 +04:00
|
|
|
inherit (lib) mkForce;
|
|
|
|
|
2024-09-27 21:56:12 +04:00
|
|
|
# so we dont cry later on why texLive is MASSIVE
|
|
|
|
tex = (pkgs.texlive.combine {
|
2024-09-30 07:15:20 +04:00
|
|
|
inherit (pkgs.texlive)
|
|
|
|
scheme-basic dvisvgm dvipng # for preview and export as html
|
|
|
|
wrapfig amsmath ulem hyperref capt-of fontspec inputenx graphics etoolbox;
|
2024-09-27 21:56:12 +04:00
|
|
|
});
|
2024-06-14 20:40:00 +04:00
|
|
|
|
2024-02-04 10:16:07 +04:00
|
|
|
myEmacs = pkgs.emacsWithPackagesFromUsePackage {
|
2024-12-04 21:33:15 +04:00
|
|
|
config = ../../../../config/emacs/init.el;
|
2024-02-14 20:32:18 +04:00
|
|
|
package = cfg.package;
|
2024-12-04 21:33:15 +04:00
|
|
|
# alwaysEnsure = true;
|
|
|
|
# alwaysTangle = true;
|
2024-02-04 10:16:07 +04:00
|
|
|
extraEmacsPackages = epkgs: [
|
|
|
|
epkgs.use-package
|
2024-12-04 21:33:15 +04:00
|
|
|
# epkgs.mu4e
|
2024-02-04 13:03:36 +04:00
|
|
|
# TODO make this check if EXWM is enabled or not
|
2024-12-04 21:33:15 +04:00
|
|
|
# epkgs.exwm
|
2024-09-30 07:15:20 +04:00
|
|
|
# epkgs.sakomodules
|
2024-06-14 21:07:23 +04:00
|
|
|
epkgs.eglot-booster
|
2024-12-04 21:33:15 +04:00
|
|
|
# epkgs.app-launcher
|
2024-02-04 10:16:07 +04:00
|
|
|
];
|
2024-06-14 21:07:23 +04:00
|
|
|
# add eglot-lsp-booster package
|
2024-09-30 07:15:20 +04:00
|
|
|
override = epkgs:
|
|
|
|
epkgs // {
|
|
|
|
eglot-booster = epkgs.trivialBuild {
|
|
|
|
pname = "eglot-booster";
|
|
|
|
version = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6";
|
2024-06-14 21:07:23 +04:00
|
|
|
|
2024-09-30 07:15:20 +04:00
|
|
|
packageRequires = with pkgs; [ emacs-lsp-booster ];
|
2024-06-14 21:07:23 +04:00
|
|
|
|
2024-09-30 07:15:20 +04:00
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "jdtsmith";
|
|
|
|
repo = "eglot-booster";
|
|
|
|
rev = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6";
|
|
|
|
hash = "sha256-vF34ZoUUj8RENyH9OeKGSPk34G6KXZhEZozQKEcRNhs=";
|
|
|
|
};
|
|
|
|
};
|
2024-12-04 21:33:15 +04:00
|
|
|
# app-launcher = epkgs.melpaBuild {
|
|
|
|
# pname = "app-launcher";
|
|
|
|
# version = "1.0";
|
|
|
|
|
|
|
|
# commit = "d5015e394b0a666a8c7c4d4bdf786266e773b145";
|
|
|
|
|
|
|
|
# recipe = pkgs.writeText "recipe" ''
|
|
|
|
# (app-launcher :repo "SebastienWae/app-launcher" :fetcher github)
|
|
|
|
# '';
|
|
|
|
|
|
|
|
# src = pkgs.fetchFromGitHub {
|
|
|
|
# owner = "SebastienWae";
|
|
|
|
# repo = "app-launcher";
|
|
|
|
# rev = "d5015e394b0a666a8c7c4d4bdf786266e773b145";
|
|
|
|
# hash = "sha256-d0d5rkuxK/zKpSCa1UTdpV7o+RDDsEeab56rI7xUJ1E=";
|
|
|
|
# };
|
|
|
|
# };
|
2024-07-19 03:16:25 +04:00
|
|
|
};
|
2024-06-14 20:40:00 +04:00
|
|
|
# override for modules
|
2024-09-30 07:15:20 +04:00
|
|
|
# override = epkgs: epkgs // {
|
|
|
|
# sakomodules = epkgs.trivialBuild {
|
|
|
|
# pname = "sakomodules";
|
|
|
|
# version = "lol";
|
2024-06-14 20:40:00 +04:00
|
|
|
|
2024-09-30 07:15:20 +04:00
|
|
|
# src = ../../../../config/emacs/modules;
|
2024-06-14 20:40:00 +04:00
|
|
|
|
2024-09-30 07:15:20 +04:00
|
|
|
# };
|
|
|
|
# };
|
2024-02-04 10:16:07 +04:00
|
|
|
};
|
2023-09-16 11:52:57 +04:00
|
|
|
in {
|
2023-09-04 12:59:43 +04:00
|
|
|
options.modules.dev.editors.emacs = {
|
2024-08-01 16:24:09 +04:00
|
|
|
enable = lib.mkEnableOption false;
|
|
|
|
daemon = lib.mkEnableOption true;
|
|
|
|
package = lib.mkOption {
|
|
|
|
type = with lib.types; package;
|
2024-02-14 20:31:00 +04:00
|
|
|
default = pkgs.emacs-unstable;
|
2024-02-14 20:29:49 +04:00
|
|
|
description = "pkgs. followed by the name of the emacs overlay package";
|
2024-02-14 20:19:37 +04:00
|
|
|
};
|
2023-09-04 12:59:43 +04:00
|
|
|
};
|
|
|
|
|
2024-08-01 16:24:09 +04:00
|
|
|
config = lib.mkIf cfg.enable {
|
2024-09-30 07:15:20 +04:00
|
|
|
nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
|
2023-12-26 15:02:02 +04:00
|
|
|
# ues daemon
|
|
|
|
services.emacs = {
|
2024-08-05 01:45:23 +04:00
|
|
|
enable = cfg.daemon;
|
2023-12-26 15:02:02 +04:00
|
|
|
install = true;
|
|
|
|
# package = pkgs.emacs29-pgtk;
|
2024-02-04 10:16:07 +04:00
|
|
|
# package = pkgs.emacsWithPackagesFromUsePackage {
|
|
|
|
# config = ../../../../config/emacs/emacs.org;
|
|
|
|
# package = pkgs.emacs-unstable;
|
|
|
|
# alwaysEnsure = true;
|
|
|
|
# alwaysTangle = true;
|
|
|
|
# extraEmacsPackages = epkgs: [
|
|
|
|
# epkgs.use-package
|
|
|
|
# epkgs.mu4e
|
|
|
|
# ];
|
|
|
|
# };
|
|
|
|
package = myEmacs;
|
2023-12-26 15:02:02 +04:00
|
|
|
};
|
|
|
|
users.users.sako.packages = with pkgs; [
|
|
|
|
# direnv
|
|
|
|
direnv
|
2023-12-26 18:19:44 +04:00
|
|
|
# mu for email
|
2024-12-04 21:33:15 +04:00
|
|
|
# mu
|
2024-09-22 12:55:44 +04:00
|
|
|
# email sync
|
2024-12-04 21:33:15 +04:00
|
|
|
# offlineimap
|
|
|
|
# (isync.override { withCyrusSaslXoauth2 = true; })
|
2024-10-14 06:35:02 +04:00
|
|
|
# oauth
|
2024-12-04 21:33:15 +04:00
|
|
|
# oama
|
2024-07-14 15:11:38 +04:00
|
|
|
# protonmail
|
2024-12-04 21:33:15 +04:00
|
|
|
# hydroxide
|
2024-10-13 17:36:50 +04:00
|
|
|
# send mail
|
2024-12-04 21:33:15 +04:00
|
|
|
# msmtp
|
2024-01-20 12:01:08 +04:00
|
|
|
# org to pdf
|
2024-09-27 21:56:12 +04:00
|
|
|
tex
|
2024-07-07 22:46:28 +04:00
|
|
|
# lsp
|
|
|
|
emacs-lsp-booster
|
2024-09-18 13:45:34 +04:00
|
|
|
# zenity-color-picker
|
|
|
|
zenity
|
2024-09-28 15:50:53 +04:00
|
|
|
# org-wild-notifier
|
|
|
|
libnotify
|
2024-09-30 07:15:20 +04:00
|
|
|
# wakatime-mode
|
|
|
|
wakatime-cli
|
2023-12-26 15:02:02 +04:00
|
|
|
];
|
2023-12-25 22:59:05 +04:00
|
|
|
|
2024-12-04 21:33:15 +04:00
|
|
|
# systemd.services.hydroxide = {
|
|
|
|
# enable = true;
|
|
|
|
# description = "Unofficial Protonmail Bridge";
|
|
|
|
# serviceConfig = {
|
|
|
|
# User = "sako";
|
|
|
|
# Type = "simple";
|
|
|
|
# };
|
|
|
|
# script = "${pkgs.hydroxide}/bin/hydroxide serve";
|
|
|
|
# wantedBy = [ "multi-user.target" ];
|
|
|
|
# };
|
2024-07-14 15:44:43 +04:00
|
|
|
|
2024-08-13 01:57:11 +04:00
|
|
|
# services.pantalaimon-headless.instances = {
|
|
|
|
# "wires.cafe" = {
|
|
|
|
# ssl = true;
|
|
|
|
# homeserver = "https://matrix.wires.cafe";
|
|
|
|
# listenAddress = "127.0.0.1";
|
|
|
|
# };
|
|
|
|
# };
|
2024-08-13 01:45:18 +04:00
|
|
|
|
2024-09-30 07:15:20 +04:00
|
|
|
home-manager.users.sako = { lib, ... }: {
|
2023-12-26 15:02:02 +04:00
|
|
|
home.file = {
|
2024-12-04 21:33:15 +04:00
|
|
|
".emacs.d/init.el".source = ../../../../config/emacs/init.el;
|
|
|
|
# ".emacs.d/icon.png".source = ../../../../config/emacs/icon.png;
|
2024-09-23 11:52:57 +04:00
|
|
|
# ".mbsyncrc".source = ../../../../config/emacs/.mbsyncrc;
|
2024-12-04 21:33:15 +04:00
|
|
|
# ".offlineimaprc".source = ../../../../config/emacs/.offlineimaprc;
|
|
|
|
# ".offlineimap.py".source = ../../../../config/emacs/.offlineimap.py;
|
|
|
|
# ".msmtprc".source = ../../../../config/emacs/.msmtprc;
|
2023-12-26 15:02:02 +04:00
|
|
|
};
|
|
|
|
};
|
2023-12-26 14:53:46 +04:00
|
|
|
|
2024-10-13 14:46:37 +04:00
|
|
|
programs.gnupg.agent.pinentryPackage = mkForce pkgs.pinentry-emacs;
|
|
|
|
|
2023-12-23 21:39:52 +04:00
|
|
|
fonts.packages = with pkgs; [
|
2024-09-30 07:15:20 +04:00
|
|
|
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
2023-10-05 07:37:12 +04:00
|
|
|
jetbrains-mono
|
2023-09-05 13:41:34 +04:00
|
|
|
];
|
2023-09-04 12:59:43 +04:00
|
|
|
};
|
|
|
|
}
|