flakes/notetaking/flake.nix

80 lines
1.9 KiB
Nix

{
description = "Emacs Notetaking flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [
(import (builtins.fetchTarball {
url = "https://github.com/nix-community/emacs-overlay/archive/master.tar.gz";
}))
];
};
plugins = with pkgs.emacsPackages; [
];
emacsDependencies = with pkgs; [
hunspell
hunspellDicts.nl_NL
hunspellDicts.en_GB-large
ghostscript
graphviz
imagemagickBig
poppler-utils
ripgrep
wl-clipboard
# Any less than medium isn't guaranteed to work
(texlive.withPackages (ps: with ps; [
scheme-medium
latexmk
# File '*.sty' not found
capt-of
preview
standalone
wrapfig
]))
# required by +jupyter
(python314.withPackages (ps: with ps; [ jupyter ]))
];
in {
devShells.default = pkgs.mkShell {
packages = [
# https://github.com/nix-community/emacs-overlay
(pkgs.emacsWithPackagesFromUsePackage {
config = ./init.el;
package = pkgs.emacs; # pkgs.emacs-git
extraEmacsPackages = epkgs: [
epkgs.org-anki
epkgs.org-pdftools
epkgs.pdf-tools
epkgs.unicode-fonts
pkgs.shellcheck
];
})
(pkgs.anki.withAddons [
#(pkgs.ankiAddons.passfail2.withConfig {
# config = {
# again_button_name = "Incorrect";
# good_button_name = "Correct";
# };
#})
pkgs.ankiAddons.anki-connect
pkgs.pandoc
])
] ++ emacsDependencies;
};
});
}