From 3ec29bd1097ba844c89d6fcc1502f7d3beced900 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Mon, 25 Dec 2023 22:59:05 +0400 Subject: [PATCH] theres no way right? --- modules/dev/editors/emacs/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/modules/dev/editors/emacs/default.nix b/modules/dev/editors/emacs/default.nix index ded004f5..4396b543 100644 --- a/modules/dev/editors/emacs/default.nix +++ b/modules/dev/editors/emacs/default.nix @@ -27,18 +27,27 @@ in { package = pkgs.emacsWithPackagesFromUsePackage { config = ../../../../config/emacs/init.el; package = pkgs.emacs-pgtk; - alwaysEnsure = true; - alwaysTangle = true; }; }; users.users.sako.packages = with pkgs; [ # direnv direnv ]; - home-manager.users.sako.home.file.".emacs.d/dashboard.png" = { - enable = true; - source = ../../../../config/emacs/dashboard.png; + + home-manager.users.${user} = {lib, ...}: { + home.file = { + ".emacs".source = ../../../../config/emacs; + "init.el".source = pkgs.runCommand "init.el" {} '' + cp ${../../../../config/emacs/emacs.org} emacs.org + ${pkgs.emacs}/bin/emacs -Q --batch ./emacs.org -f org-babel-tangle + mv init.el $out + ''; + + # Create the auto-saves directory + # ".emacs.d/auto-saves/.manage-directory".text = ""; + }; }; + fonts.packages = with pkgs; [ (nerdfonts.override {fonts = ["JetBrainsMono"];}) jetbrains-mono