I'm not 100% this works yet. But the idea here is to symlink from the config directory into where we are locally storing the doom config. The intention here is to enable `doom sync` to work without requiring a full NixOS rebuild
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
doomEmacs = pkgs.fetchFromGitHub {
|
|
owner = "doomemacs";
|
|
repo = "doomemacs";
|
|
rev = "8406c1ff22b95bd0f816de4a0223fa3ce3c82568";
|
|
sha256 = "sha256-rOkgOdmLESVAbOeEM9nJTzxyI+akdk48Ed2VlktOy3Q=";
|
|
};
|
|
in
|
|
{
|
|
config = {
|
|
home.packages = [
|
|
pkgs.emacs
|
|
|
|
pkgs.emacs-all-the-icons-fonts
|
|
pkgs.fira-code
|
|
pkgs.fontconfig
|
|
pkgs.graphviz
|
|
pkgs.isort
|
|
pkgs.nerd-fonts.fira-code
|
|
pkgs.nerd-fonts.droid-sans-mono
|
|
pkgs.nil # nix lsp language server
|
|
pkgs.nixfmt-rfc-style
|
|
(pkgs.ripgrep.override {withPCRE2 = true;})
|
|
pkgs.pipenv
|
|
pkgs.poetry
|
|
pkgs.python3
|
|
];
|
|
|
|
fonts.fontconfig.enable = true;
|
|
|
|
home.file."${config.xdg.configHome}/emacs".source = doomEmacs;
|
|
home.sessionPath = [
|
|
"${config.xdg.configHome}/emacs/bin"
|
|
];
|
|
|
|
home.sessionVariables = {
|
|
DOOMDIR = "${config.xdg.configHome}/doom";
|
|
DOOMLOCALDIR = "${config.xdg.dataHome}/doom";
|
|
};
|
|
|
|
home.activation.doomConfig = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
|
if [ ! -L "${config.xdg.configHome}/doom" ]; then
|
|
rm -rf "${config.xdg.configHome}/doom"
|
|
ln -sf "${./doom}" "${config.xdg.configHome}/doom"
|
|
fi
|
|
'';
|
|
};
|
|
}
|