mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-06-12 17:34:24 +02:00
fix: doom-emacs
This commit is contained in:
Generated
+17
@@ -116,6 +116,22 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"doomemacs": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1702066305,
|
||||||
|
"narHash": "sha256-PdQD6f+TGgu0Nf/zvmJOHzrfLC50d4pWjK2dIQIizlw=",
|
||||||
|
"owner": "doomemacs",
|
||||||
|
"repo": "doomemacs",
|
||||||
|
"rev": "03d692f129633e3bf0bd100d91b3ebf3f77db6d1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "doomemacs",
|
||||||
|
"repo": "doomemacs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"emacs-overlay": {
|
"emacs-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
@@ -965,6 +981,7 @@
|
|||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"anyrun": "anyrun",
|
"anyrun": "anyrun",
|
||||||
"astronvim": "astronvim",
|
"astronvim": "astronvim",
|
||||||
|
"doomemacs": "doomemacs",
|
||||||
"emacs-overlay": "emacs-overlay",
|
"emacs-overlay": "emacs-overlay",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
|
|||||||
@@ -164,6 +164,11 @@
|
|||||||
url = "github:AstroNvim/AstroNvim/v3.40.3";
|
url = "github:AstroNvim/AstroNvim/v3.40.3";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
# doom-emacs is a configuration framework for GNU Emacs.
|
||||||
|
doomemacs = {
|
||||||
|
url = "github:doomemacs/doomemacs";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
polybar-themes = {
|
polybar-themes = {
|
||||||
url = "github:adi1090x/polybar-themes";
|
url = "github:adi1090x/polybar-themes";
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
# ==============================================
|
# ==============================================
|
||||||
# based on doomemacs's auther's config:
|
# Based on doomemacs's auther's config:
|
||||||
# https://github.com/hlissner/dotfiles/blob/master/modules/editors/emacs.nix
|
# https://github.com/hlissner/dotfiles/blob/master/modules/editors/emacs.nix
|
||||||
|
#
|
||||||
|
# Emacs Tutorials:
|
||||||
|
# 1. Official: <https://www.gnu.org/software/emacs/tour/index.html>
|
||||||
|
# 2. Doom Emacs: <https://github.com/doomemacs/doomemacs/blob/master/docs/index.org>
|
||||||
|
#
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
doomemacs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
@@ -17,10 +23,6 @@ in {
|
|||||||
enable = mkEnableOption "Emacs Editor";
|
enable = mkEnableOption "Emacs Editor";
|
||||||
doom = {
|
doom = {
|
||||||
enable = mkEnableOption "Doom Emacs";
|
enable = mkEnableOption "Doom Emacs";
|
||||||
repoUrl = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "https://github.com/doomemacs/doomemacs";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -63,10 +65,7 @@ in {
|
|||||||
|
|
||||||
home.activation = mkIf cfg.doom.enable {
|
home.activation = mkIf cfg.doom.enable {
|
||||||
installDoomEmacs = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
installDoomEmacs = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
if [ ! -d "${config.xdg.configHome}/emacs" ]; then
|
${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F744 ${doomemacs}/ ${config.xdg.configHome}/emacs/
|
||||||
echo "Installing Doom Emacs..."
|
|
||||||
${pkgs.git}/bin/git clone --depth=1 --single-branch "${cfg.doom.repoUrl}" "${config.xdg.configHome}/emacs"
|
|
||||||
fi
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user