diff --git a/modules/dev/editors/emacs/default.nix b/modules/dev/editors/emacs/default.nix index 47ac0d99..85c380ae 100644 --- a/modules/dev/editors/emacs/default.nix +++ b/modules/dev/editors/emacs/default.nix @@ -5,20 +5,24 @@ lib, pkgs, inputs, + trivialBuild, ... }: with lib; let cfg = config.modules.dev.editors.emacs; myEmacs = pkgs.emacsWithPackagesFromUsePackage { - config = ../../../../config/emacs/emacs.org; + #config = ../../../../config/emacs/emacs.org; + config = ../../../../config/emacs/init.el; package = cfg.package; alwaysEnsure = true; - alwaysTangle = true; + #alwaysTangle = true; + defaultInitFile = true; extraEmacsPackages = epkgs: [ epkgs.use-package epkgs.mu4e # TODO make this check if EXWM is enabled or not + sako.sakomacsModules epkgs.exwm ]; }; @@ -72,12 +76,13 @@ in { home-manager.users.sako = {lib, ...}: { home.file = { - ".emacs.d/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 - ''; - ".emacs.d/dashboard.png".source = ../../../../config/emacs/dashboard.png; + # ".emacs.d/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 + # ''; + #".emacs.d/dashboard.png".source = ../../../../config/emacs/dashboard.png; + ".emacs.d/modules".source = ../../../../config/emacs/modules; }; }; diff --git a/packages/default.nix b/packages/default.nix index 2aa2711e..ef9ce186 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -4,4 +4,5 @@ # example = pkgs.callPackage ./example { }; sako.davinci-resolve = pkgs.callPackage ./davinci-resolve.nix {}; nullpomino = pkgs.callPackage ./nullpomino.nix {}; + sako.sakomacsModules = pkgs.callPackage ./sakomacsModules.nix {}; } diff --git a/packages/sakomacsModules.nix b/packages/sakomacsModules.nix new file mode 100644 index 00000000..efa77ae4 --- /dev/null +++ b/packages/sakomacsModules.nix @@ -0,0 +1,21 @@ +{ +trivialBuild +, lib +}: + +trivialBuild { + pname = "sakomodules"; + version = "lol"; + src = ../../../../config/emacs/modules; + + postInstall = '' + cp -r $src $LISPDIR + ''; + + meta = { + description = "lol"; + license = lib.licenses.gpl3; + platforms = lib.platforms.all; + }; + +}