feat: Add spacemacs module and update system

This commit is contained in:
ulic-youthlic 2025-09-17 00:25:17 +08:00
parent 63ab4323a5
commit 8fec2465d3
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
6 changed files with 238 additions and 106 deletions

View file

@ -0,0 +1,51 @@
{
config,
pkgs,
lib,
inputs,
...
}:
let
inherit (inputs) nixpkgs emacs-overlay spacemacs;
inherit (pkgs) system;
cfg = config.david.programs.spacemacs;
pkgs' = import nixpkgs {
inherit system;
overlays = [ emacs-overlay.overlays.default ];
};
in
{
options = {
david.programs.spacemacs = {
enable = lib.mkEnableOption "spacemacs";
};
};
config = lib.mkIf cfg.enable {
stylix.targets.emacs.enable = false;
xdg.configFile = {
emacs = {
source = "${spacemacs}";
recursive = true;
};
};
programs.emacs = {
enable = true;
package =
with pkgs';
(emacsPackagesFor emacs-pgtk).emacsWithPackages (epkgs: [
git
gnutar
ripgrep
]);
};
services.emacs = {
client = {
enable = true;
};
defaultEditor = false;
enable = true;
socketActivation.enable = true;
startWithUserSession = true;
};
};
}