dev/emacs: add wakatime-cli

This commit is contained in:
Sakooooo 2024-09-30 07:15:20 +04:00
parent a475f3ab1e
commit 081f6320bc
Signed by: sako
GPG key ID: 3FD715D87D7725E0

View file

@ -1,21 +1,12 @@
{ { outputs, options, config, lib, pkgs, inputs, ... }:
outputs,
options,
config,
lib,
pkgs,
inputs,
...
}:
let let
cfg = config.modules.dev.editors.emacs; cfg = config.modules.dev.editors.emacs;
# so we dont cry later on why texLive is MASSIVE # so we dont cry later on why texLive is MASSIVE
tex = (pkgs.texlive.combine { tex = (pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-basic inherit (pkgs.texlive)
dvisvgm dvipng # for preview and export as html scheme-basic dvisvgm dvipng # for preview and export as html
wrapfig amsmath ulem hyperref capt-of fontspec inputenx graphics wrapfig amsmath ulem hyperref capt-of fontspec inputenx graphics etoolbox;
etoolbox;
}); });
myEmacs = pkgs.emacsWithPackagesFromUsePackage { myEmacs = pkgs.emacsWithPackagesFromUsePackage {
@ -28,54 +19,54 @@ let
epkgs.mu4e epkgs.mu4e
# TODO make this check if EXWM is enabled or not # TODO make this check if EXWM is enabled or not
epkgs.exwm epkgs.exwm
# epkgs.sakomodules # epkgs.sakomodules
epkgs.eglot-booster epkgs.eglot-booster
epkgs.app-launcher epkgs.app-launcher
]; ];
# add eglot-lsp-booster package # add eglot-lsp-booster package
override = epkgs: epkgs // { override = epkgs:
eglot-booster = epkgs.trivialBuild { epkgs // {
pname = "eglot-booster"; eglot-booster = epkgs.trivialBuild {
version = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6"; pname = "eglot-booster";
version = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6";
packageRequires = with pkgs; [ emacs-lsp-booster ]; packageRequires = with pkgs; [ emacs-lsp-booster ];
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "jdtsmith"; owner = "jdtsmith";
repo = "eglot-booster"; repo = "eglot-booster";
rev = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6"; rev = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6";
hash = "sha256-vF34ZoUUj8RENyH9OeKGSPk34G6KXZhEZozQKEcRNhs="; hash = "sha256-vF34ZoUUj8RENyH9OeKGSPk34G6KXZhEZozQKEcRNhs=";
};
};
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=";
};
};
}; };
};
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=";
};
};
};
# override for modules # override for modules
# override = epkgs: epkgs // { # override = epkgs: epkgs // {
# sakomodules = epkgs.trivialBuild { # sakomodules = epkgs.trivialBuild {
# pname = "sakomodules"; # pname = "sakomodules";
# version = "lol"; # version = "lol";
# src = ../../../../config/emacs/modules; # src = ../../../../config/emacs/modules;
# }; # };
# }; # };
}; };
in { in {
options.modules.dev.editors.emacs = { options.modules.dev.editors.emacs = {
@ -89,9 +80,7 @@ in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
nixpkgs.overlays = [ nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
inputs.emacs-overlay.overlay
];
# ues daemon # ues daemon
services.emacs = { services.emacs = {
enable = cfg.daemon; enable = cfg.daemon;
@ -128,6 +117,8 @@ in {
zenity zenity
# org-wild-notifier # org-wild-notifier
libnotify libnotify
# wakatime-mode
wakatime-cli
]; ];
systemd.services.hydroxide = { systemd.services.hydroxide = {
@ -149,9 +140,9 @@ in {
# }; # };
# }; # };
home-manager.users.sako = {lib, ...}: { home-manager.users.sako = { lib, ... }: {
home.file = { home.file = {
".emacs.d/init.el".source = pkgs.runCommand "init.el" {} '' ".emacs.d/init.el".source = pkgs.runCommand "init.el" { } ''
cp ${../../../../config/emacs/emacs.org} emacs.org cp ${../../../../config/emacs/emacs.org} emacs.org
${myEmacs}/bin/emacs -Q --batch ./emacs.org -f org-babel-tangle ${myEmacs}/bin/emacs -Q --batch ./emacs.org -f org-babel-tangle
mv init.el $out mv init.el $out
@ -164,7 +155,7 @@ in {
}; };
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
(nerdfonts.override {fonts = ["JetBrainsMono"];}) (nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
jetbrains-mono jetbrains-mono
]; ];
}; };