2023-06-23 01:23:10 +05:30
|
|
|
{ config, lib, pkgs, eaf, eaf-browser, org-nursery, theme, ... }:
|
2023-06-04 21:22:24 +05:30
|
|
|
let
|
2023-06-23 01:23:10 +05:30
|
|
|
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+theme)+"/polarity.txt"));
|
|
|
|
dashboardLogo = ./. + "/nix-" + themePolarity + ".png";
|
2023-06-04 21:22:24 +05:30
|
|
|
in
|
2023-05-16 04:48:59 +05:30
|
|
|
{
|
|
|
|
programs.doom-emacs = {
|
|
|
|
enable = true;
|
|
|
|
doomPrivateDir = ./.;
|
2023-06-15 01:18:04 +05:30
|
|
|
# This block from https://github.com/znewman01/dotfiles/blob/be9f3a24c517a4ff345f213bf1cf7633713c9278/emacs/default.nix#L12-L34
|
|
|
|
# Only init/packages so we only rebuild when those change.
|
|
|
|
doomPackageDir = let
|
|
|
|
filteredPath = builtins.path {
|
|
|
|
path = ./.;
|
|
|
|
name = "doom-private-dir-filtered";
|
|
|
|
filter = path: type:
|
|
|
|
builtins.elem (baseNameOf path) [ "init.el" "packages.el" ];
|
|
|
|
};
|
|
|
|
in pkgs.linkFarm "doom-packages-dir" [
|
|
|
|
{
|
|
|
|
name = "init.el";
|
|
|
|
path = "${filteredPath}/init.el";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "packages.el";
|
|
|
|
path = "${filteredPath}/packages.el";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "config.el";
|
|
|
|
path = pkgs.emptyFile;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
# End block
|
2023-05-16 04:48:59 +05:30
|
|
|
};
|
2023-06-11 09:34:03 +05:30
|
|
|
|
2023-05-16 04:48:59 +05:30
|
|
|
home.file.".emacs.d/themes/doom-stylix-theme.el".source = config.lib.stylix.colors {
|
|
|
|
template = builtins.readFile ./themes/doom-stylix-theme.el.mustache;
|
|
|
|
extension = ".el";
|
|
|
|
};
|
2023-06-11 09:34:03 +05:30
|
|
|
|
2023-05-20 06:55:57 +05:30
|
|
|
home.packages = with pkgs; [
|
2023-07-28 04:10:51 +05:30
|
|
|
nil
|
|
|
|
nixfmt
|
2023-05-20 06:55:57 +05:30
|
|
|
git
|
2023-06-16 04:57:06 +05:30
|
|
|
file
|
2023-05-20 06:55:57 +05:30
|
|
|
nodejs
|
|
|
|
wmctrl
|
|
|
|
jshon
|
|
|
|
aria
|
2023-06-02 07:48:06 +05:30
|
|
|
hledger
|
2023-06-11 09:34:03 +05:30
|
|
|
hunspell hunspellDicts.en_US-large
|
|
|
|
pandoc
|
2023-06-02 07:48:06 +05:30
|
|
|
nodePackages.mermaid-cli
|
2023-05-20 06:55:57 +05:30
|
|
|
(python3.withPackages (p: with p; [
|
|
|
|
pandas
|
|
|
|
requests
|
|
|
|
pyqt6 sip qtpy qt6.qtwebengine epc lxml pyqt6-webengine
|
|
|
|
pysocks
|
|
|
|
pymupdf
|
|
|
|
markdown
|
|
|
|
]))];
|
2023-06-11 09:34:03 +05:30
|
|
|
|
|
|
|
home.sessionVariables = {
|
|
|
|
EDITOR = "emacsclient";
|
|
|
|
};
|
|
|
|
|
2023-05-20 06:55:57 +05:30
|
|
|
home.file.".emacs.d/eaf" = {
|
|
|
|
source = "${eaf}";
|
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
home.file.".emacs.d/eaf/app/browser" = {
|
|
|
|
source = "${eaf-browser}";
|
|
|
|
recursive = true;
|
|
|
|
onChange = "
|
|
|
|
pushd ~/.emacs.d/eaf/app/browser;
|
2023-05-20 07:21:12 +05:30
|
|
|
rm package*.json;
|
|
|
|
npm install darkreader @mozilla/readability && rm package*.json;
|
2023-05-20 06:55:57 +05:30
|
|
|
popd;
|
|
|
|
";
|
|
|
|
};
|
2023-06-04 09:42:31 +05:30
|
|
|
home.file.".emacs.d/org-nursery" = {
|
|
|
|
source = "${org-nursery}";
|
|
|
|
};
|
2023-06-23 01:23:10 +05:30
|
|
|
home.file.".emacs.d/dashboard-logo.png".source = dashboardLogo;
|
2023-06-16 04:57:06 +05:30
|
|
|
home.file.".emacs.d/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh" = {
|
|
|
|
source = ./scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh;
|
|
|
|
executable = true;
|
|
|
|
};
|
2023-05-16 04:48:59 +05:30
|
|
|
}
|