emacs: move config to separate git repo
This commit is contained in:
@ -20,16 +20,55 @@ config, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.modules.emacs;
|
||||
let
|
||||
cfg = config.modules.emacs;
|
||||
doomRepoUrl = "https://github.com/doomemacs/doomemacs";
|
||||
configRepoUrl = "https://gitlab.julian-mutter.de/julian/emacs-config";
|
||||
in {
|
||||
options.modules.emacs = { enable = mkOption { default = false; }; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.file = {
|
||||
".config/doom" = {
|
||||
source = ./doom;
|
||||
recursive = false;
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
emacs
|
||||
binutils # native-comp needs 'as', provided by this
|
||||
|
||||
## Doom dependencies
|
||||
git
|
||||
(ripgrep.override { withPCRE2 = true; })
|
||||
|
||||
## Optional dependencies
|
||||
fd # faster projectile indexing
|
||||
imagemagick # for image-dired
|
||||
zstd # for undo-fu-session/undo-tree compression
|
||||
|
||||
## Module dependencies
|
||||
(aspellWithDicts (ds: with ds; [ en en-computers en-science de ]))
|
||||
sqlite
|
||||
|
||||
# Code formatters for use with doom emacs
|
||||
nixfmt # nix
|
||||
dockfmt # docker
|
||||
google-java-format # java
|
||||
black # python
|
||||
rustfmt # rust
|
||||
shfmt
|
||||
|
||||
graphviz
|
||||
# Lsps for use with doom emacs
|
||||
# neocmakelsp # cmake
|
||||
|
||||
emacs-all-the-icons-fonts
|
||||
];
|
||||
|
||||
home.activation = {
|
||||
installDoomEmacs = ''
|
||||
if [ ! -d "~/.config/emacs" ]; then
|
||||
${pkgs.git}/bin/git clone --depth=1 --single-branch "${doomRepoUrl}" "~/.config/emacs"
|
||||
fi
|
||||
if [ ! -d "~/.config/doom" ]; then
|
||||
${pkgs.git}/bin/git clone "${configRepoUrl}" "~/.config/doom"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user