2023-09-04 12:59:43 +04:00
|
|
|
{
|
2023-09-16 11:52:57 +04:00
|
|
|
outputs,
|
|
|
|
options,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
2023-12-25 13:27:36 +04:00
|
|
|
inputs,
|
2023-09-16 11:52:57 +04:00
|
|
|
...
|
|
|
|
}:
|
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-06-14 20:40:00 +04:00
|
|
|
|
2024-02-04 10:16:07 +04:00
|
|
|
myEmacs = pkgs.emacsWithPackagesFromUsePackage {
|
2024-06-14 20:40:00 +04:00
|
|
|
config = ../../../../config/emacs/emacs.org;
|
2024-02-14 20:32:18 +04:00
|
|
|
package = cfg.package;
|
2024-02-04 10:16:07 +04:00
|
|
|
alwaysEnsure = true;
|
2024-06-14 20:40:00 +04:00
|
|
|
alwaysTangle = true;
|
2024-02-04 10:16:07 +04:00
|
|
|
extraEmacsPackages = epkgs: [
|
|
|
|
epkgs.use-package
|
|
|
|
epkgs.mu4e
|
2024-02-04 13:03:36 +04:00
|
|
|
# TODO make this check if EXWM is enabled or not
|
|
|
|
epkgs.exwm
|
2024-06-14 20:40:00 +04:00
|
|
|
# epkgs.sakomodules
|
2024-06-14 21:07:23 +04:00
|
|
|
epkgs.eglot-booster
|
2024-07-19 03:26:11 +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
|
|
|
|
override = epkgs: epkgs // {
|
|
|
|
eglot-booster = epkgs.trivialBuild {
|
|
|
|
pname = "eglot-booster";
|
|
|
|
version = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6";
|
|
|
|
|
|
|
|
packageRequires = with pkgs; [ emacs-lsp-booster ];
|
|
|
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "jdtsmith";
|
|
|
|
repo = "eglot-booster";
|
|
|
|
rev = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6";
|
|
|
|
hash = "sha256-vF34ZoUUj8RENyH9OeKGSPk34G6KXZhEZozQKEcRNhs=";
|
|
|
|
};
|
|
|
|
};
|
2024-07-19 03:23:58 +04:00
|
|
|
app-launcher = epkgs.melpaBuild {
|
2024-07-19 03:30:50 +04:00
|
|
|
pname = "app-launcher";
|
2024-07-19 03:27:12 +04:00
|
|
|
version = "1.0";
|
2024-07-19 03:16:25 +04:00
|
|
|
|
2024-07-19 03:30:50 +04:00
|
|
|
|
|
|
|
commit = "d5015e394b0a666a8c7c4d4bdf786266e773b145";
|
|
|
|
|
2024-07-19 03:31:50 +04:00
|
|
|
recipe = pkgs.writeText "recipe" ''
|
2024-07-19 03:30:50 +04:00
|
|
|
(app-launcher :repo "SebastienWae/app-launcher" :fetcher github)
|
|
|
|
'';
|
|
|
|
|
2024-07-19 03:16:25 +04:00
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "SebastienWae";
|
|
|
|
repo = "app-launcher";
|
|
|
|
rev = "d5015e394b0a666a8c7c4d4bdf786266e773b145";
|
2024-07-19 03:18:28 +04:00
|
|
|
hash = "sha256-d0d5rkuxK/zKpSCa1UTdpV7o+RDDsEeab56rI7xUJ1E=";
|
2024-07-19 03:16:25 +04:00
|
|
|
};
|
|
|
|
};
|
2024-06-14 21:07:23 +04:00
|
|
|
};
|
2024-06-14 20:40:00 +04:00
|
|
|
# override for modules
|
|
|
|
# override = epkgs: epkgs // {
|
|
|
|
# sakomodules = epkgs.trivialBuild {
|
|
|
|
# pname = "sakomodules";
|
|
|
|
# version = "lol";
|
|
|
|
|
|
|
|
# src = ../../../../config/emacs/modules;
|
|
|
|
|
|
|
|
# };
|
|
|
|
# };
|
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 {
|
2023-12-26 15:02:02 +04:00
|
|
|
nixpkgs.overlays = [
|
|
|
|
inputs.emacs-overlay.overlay
|
|
|
|
];
|
|
|
|
# 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
|
|
|
|
mu
|
2024-09-22 12:55:44 +04:00
|
|
|
# email sync
|
|
|
|
offlineimap
|
2024-07-14 15:11:38 +04:00
|
|
|
# protonmail
|
|
|
|
hydroxide
|
2024-01-12 16:47:56 +04:00
|
|
|
# doc-view
|
|
|
|
unoconv
|
2024-01-20 12:01:08 +04:00
|
|
|
# org to pdf
|
|
|
|
# this might be bloat...
|
2024-09-26 13:45:56 +04:00
|
|
|
texliveMedium
|
2024-07-07 22:46:28 +04:00
|
|
|
# lsp
|
|
|
|
emacs-lsp-booster
|
2024-09-18 13:45:34 +04:00
|
|
|
# zenity-color-picker
|
|
|
|
zenity
|
2023-12-26 15:02:02 +04:00
|
|
|
];
|
2023-12-25 22:59:05 +04:00
|
|
|
|
2024-07-14 15:44:43 +04:00
|
|
|
systemd.services.hydroxide = {
|
|
|
|
enable = true;
|
|
|
|
description = "Unofficial Protonmail Bridge";
|
|
|
|
serviceConfig = {
|
|
|
|
User = "sako";
|
|
|
|
Type = "simple";
|
|
|
|
};
|
2024-07-14 15:47:56 +04:00
|
|
|
script = "${pkgs.hydroxide}/bin/hydroxide serve";
|
2024-07-14 15:46:31 +04:00
|
|
|
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
|
|
|
|
2023-12-26 15:02:02 +04:00
|
|
|
home-manager.users.sako = {lib, ...}: {
|
|
|
|
home.file = {
|
2024-06-14 20:40:00 +04:00
|
|
|
".emacs.d/init.el".source = pkgs.runCommand "init.el" {} ''
|
|
|
|
cp ${../../../../config/emacs/emacs.org} emacs.org
|
2024-09-18 13:34:55 +04:00
|
|
|
${myEmacs}/bin/emacs -Q --batch ./emacs.org -f org-babel-tangle
|
2024-06-14 20:40:00 +04:00
|
|
|
mv init.el $out
|
|
|
|
'';
|
2024-06-21 23:34:37 +04:00
|
|
|
".emacs.d/icon.png".source = ../../../../config/emacs/icon.png;
|
2024-09-23 11:52:57 +04:00
|
|
|
# ".mbsyncrc".source = ../../../../config/emacs/.mbsyncrc;
|
2024-09-23 11:54:50 +04:00
|
|
|
".offlineimaprc".source = ../../../../config/emacs/.offlineimaprc;
|
2024-09-23 11:56:17 +04:00
|
|
|
".offlineimap.py".source = ../../../../config/emacs/.offlineimap.py;
|
2023-12-26 15:02:02 +04:00
|
|
|
};
|
|
|
|
};
|
2023-12-26 14:53:46 +04:00
|
|
|
|
2023-12-23 21:39:52 +04:00
|
|
|
fonts.packages = with pkgs; [
|
2023-09-16 11:52:57 +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
|
|
|
};
|
|
|
|
}
|