feat(home/base/tui/editors): replace rsync by config.lib.file.mkOutOfStoreSymlink

This commit is contained in:
Ryan Yin
2024-11-22 18:55:25 +08:00
parent 961d24c80a
commit 595f76e120
3 changed files with 7 additions and 28 deletions

View File

@@ -27,6 +27,8 @@ with lib; let
myEmacsPackagesFor = emacs: ((pkgs.emacsPackagesFor emacs).emacsWithPackages (epkgs: [
epkgs.vterm
]));
# to make this symlink work, we need to git clone this repo to your home directory.
configPath = "${config.home.homeDirectory}/nix-config/home/base/tui/editors/emacs/doom";
in {
options.modules.editors.emacs = {
enable = mkEnableOption "Emacs Editor";
@@ -65,10 +67,7 @@ in {
home.shellAliases = shellAliases;
programs.nushell.shellAliases = shellAliases;
xdg.configFile."doom" = {
source = ./doom;
force = true;
};
xdg.configFile."doom".source = config.lib.file.mkOutOfStoreSymlink configPath;
home.activation.installDoomEmacs = lib.hm.dag.entryAfter ["writeBoundary"] ''
${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F744 ${doomemacs}/ ${config.xdg.configHome}/emacs/

View File

@@ -15,10 +15,11 @@ let
v = "nvim";
vdiff = "nvim -d";
};
# the path to nvim directory
# to make this symlink work, we need to git clone this repo to your home directory.
configPath = "${config.home.homeDirectory}/nix-config/home/base/tui/editors/neovim/nvim";
in {
home.activation.installAstroNvim = lib.hm.dag.entryAfter ["writeBoundary"] ''
${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F744 ${./nvim}/ ${config.xdg.configHome}/nvim/
'';
xdg.configFile."nvim".source = config.lib.file.mkOutOfStoreSymlink configPath;
home.shellAliases = shellAliases;
programs.nushell.shellAliases = shellAliases;