configs/emacs: move things around so I can add packages
It would be nice if they weren't system level.. but this works
This commit is contained in:
parent
ab773d3f69
commit
f7dcd6dcd7
@ -3,17 +3,18 @@
|
||||
./alacritty.nix
|
||||
./ca.nix
|
||||
./ci.nix
|
||||
./smug.nix
|
||||
./konsole.nix
|
||||
./colemak.nix
|
||||
./dns.nix
|
||||
./doas.nix
|
||||
./emacs.nix
|
||||
./git.nix
|
||||
./konsole.nix
|
||||
./manager.nix
|
||||
./neovim.nix
|
||||
./net-overlay.nix
|
||||
./nix.nix
|
||||
./polybar.nix
|
||||
./smug.nix
|
||||
./ssh.nix
|
||||
./tmux.nix
|
||||
./update.nix
|
||||
|
@ -1,21 +1,31 @@
|
||||
{ emacsWithPackagesFromUsePackage
|
||||
{ config
|
||||
, pkgs
|
||||
, emacsPkg ? pkgs.emacs-pgtk
|
||||
, isUnstable
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
emacsWithPackagesFromUsePackage {
|
||||
config = ./emacs.org;
|
||||
let
|
||||
myEmacs = pkgs.callPackage ../pkgs/emacs.nix { inherit isUnstable; };
|
||||
editorScript = pkgs.writeShellScriptBin "emacseditor" ''
|
||||
if [ -z "$1" ]; then
|
||||
exec ${myEmacs}/bin/emacsclient --create-frame --alternate-editor ${myEmacs}/bin/emacs
|
||||
else
|
||||
exec ${myEmacs}/bin/emacsclient --alternate-editor ${myEmacs}/bin/emacs "$@"
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
config = {
|
||||
environment = {
|
||||
variables.EDITOR = lib.mkOverride 900 "emacseditor";
|
||||
systemPackages = with pkgs; [
|
||||
(aspellWithDicts (dicts: with dicts; [ en en-computers es de ]))
|
||||
go-font
|
||||
texlive.combined.scheme-full
|
||||
|
||||
alwaysEnsure = true;
|
||||
alwaysTangle = true;
|
||||
|
||||
defaultInitFile = true;
|
||||
package = emacsPkg;
|
||||
|
||||
override = epkgs: epkgs // {
|
||||
ollama = pkgs.callPackage ../pkgs/ollama-el.nix {
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
inherit (epkgs) trivialBuild;
|
||||
myEmacs
|
||||
editorScript
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
, lib
|
||||
, pkgs
|
||||
, xinlib
|
||||
, isUnstable
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
@ -12,17 +11,9 @@ let
|
||||
inherit (inputs.beyt.packages.${pkgs.system}) beyt;
|
||||
firefox = import ../configs/firefox.nix { inherit pkgs; };
|
||||
rage = pkgs.writeScriptBin "rage" (import ../bins/rage.nix { inherit pkgs; });
|
||||
myEmacs = pkgs.callPackage ../configs/emacs.nix { inherit isUnstable; };
|
||||
rpr =
|
||||
pkgs.writeScriptBin "rpr"
|
||||
(import ../bins/rpr.nix { inherit (pkgs) hut gh tea; });
|
||||
editorScript = pkgs.writeShellScriptBin "emacseditor" ''
|
||||
if [ -z "$1" ]; then
|
||||
exec ${myEmacs}/bin/emacsclient --create-frame --alternate-editor ${myEmacs}/bin/emacs
|
||||
else
|
||||
exec ${myEmacs}/bin/emacsclient --alternate-editor ${myEmacs}/bin/emacs "$@"
|
||||
fi
|
||||
'';
|
||||
promnesia =
|
||||
pkgs.python3Packages.callPackage ../pkgs/promnesia.nix { inherit pkgs; };
|
||||
hpi = pkgs.python3Packages.callPackage ../pkgs/hpi.nix { inherit pkgs; };
|
||||
@ -113,10 +104,8 @@ with lib; {
|
||||
SSH_AUTH_SOCK = "$HOME/.traygent";
|
||||
OLLAMA_HOST = "https://ollama.otter-alligator.ts.net";
|
||||
};
|
||||
variables.EDITOR = mkOverride 900 "emacseditor";
|
||||
systemPackages = with pkgs; (xinlib.filterList [
|
||||
alacritty
|
||||
(aspellWithDicts (dicts: with dicts; [ en en-computers es de ]))
|
||||
bc
|
||||
beyt
|
||||
black
|
||||
@ -137,8 +126,6 @@ with lib; {
|
||||
zeal
|
||||
trayscale
|
||||
|
||||
myEmacs
|
||||
editorScript
|
||||
(callPackage ../configs/helix.nix { })
|
||||
]);
|
||||
};
|
||||
|
21
pkgs/emacs.nix
Normal file
21
pkgs/emacs.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ emacsWithPackagesFromUsePackage
|
||||
, pkgs
|
||||
, emacsPkg ? pkgs.emacs-pgtk
|
||||
, ...
|
||||
}:
|
||||
emacsWithPackagesFromUsePackage {
|
||||
config = ../configs/emacs.org;
|
||||
|
||||
alwaysEnsure = true;
|
||||
alwaysTangle = true;
|
||||
|
||||
defaultInitFile = true;
|
||||
package = emacsPkg;
|
||||
|
||||
override = epkgs: epkgs // {
|
||||
ollama = pkgs.callPackage ../pkgs/ollama-el.nix {
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
inherit (epkgs) trivialBuild;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user