initial commit

This commit is contained in:
2025-05-04 02:47:36 +02:00
commit d5e06f3f49
91 changed files with 9063 additions and 0 deletions

36
users/modules/emacs.nix Normal file
View File

@@ -0,0 +1,36 @@
{
pkgs,
config,
lib,
...
}: let
emacsDefaultPackage = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (
epkgs: [
epkgs.vterm
epkgs.mu4e
epkgs.pdf-tools
]
));
cfg = config.modules.emacs;
in {
options.modules.emacs = {
enable = lib.mkEnableOption "enables Emacs";
package = lib.mkOption {
type = lib.types.package;
default = emacsDefaultPackage;
};
service = lib.mkEnableOption "enables Emacs service";
};
config = {
programs.emacs = lib.mkIf cfg.enable {
enable = true;
inherit (cfg) package;
};
services.emacs = lib.mkIf cfg.service {
enable = true;
inherit (cfg) package;
startWithUserSession = "graphical";
};
};
}