dotfiles/modules/emacs/default.nix
2021-09-09 22:06:18 +02:00

31 lines
700 B
Nix

{ config, lib, pkgs, ... }:
let
base = {
programs.emacs.enable = true;
services.emacs.enable = true;
xdg = {
enable = true;
configFile = {
"doom" = {
source = ./doom;
recursive = true;
onChange = ''
#!/bin/sh
DOOM="$HOME/.emacs.d"
if [ ! -d "$DOOM" ]; then
git clone https://github.com/hlissner/doom-emacs.git "$DOOM"
"$DOOM/bin/doom" -y install
fi
"$DOOM/bin/doom" sync
'';
};
};
};
};
in
{
home-manager.users.moritz = {...}: (base);
}