~ruther/nixos-config

7be05bcdd667ac0ddf09c86ee0fb00d6309d3e11 — Rutherther 1 year, 6 months ago dc830f6
feat: download doom emacs on activation
1 files changed, 21 insertions(+), 1 deletions(-)

M modules/editors/emacs/home.nix
M modules/editors/emacs/home.nix => modules/editors/emacs/home.nix +21 -1
@@ 13,7 13,9 @@

{ config, user, unstable, pkgs, inputs, location, ... }:

{
let
  doomRev = "844a82c";
in {
  services.emacs = {
    enable = true;
    client = {


@@ 32,6 34,24 @@
    ];
  };

  home.activation = {
    linkDoomConfig = {
      after = [ "writeBoundary" "createXdgUserDirectories" ];
      before = [  ];
      data =
        ''
            EMACS=$HOME/.emacs.d
            if [ ! -d "$EMACS" ]; then
              ${pkgs.git}/bin/git clone https://github.com/doomemacs/doomemacs $EMACS
              (cd $EMACS && ${pkgs.git}/bin/git checkout ${doomRev})
            fi
            if [ ! -d "$HOME/.doom.d" ]; then
                ln -s ${location}/modules/editors/emacs/doom.d $HOME/.doom.d
            fi
        '';
    };
  };

  home.packages = with pkgs; [
    emacs-all-the-icons-fonts
    #binutils # for native comp

Do not follow this link