nixos-config/modules/dev/documentation.nix

53 lines
1.8 KiB
Nix
Raw Normal View History

2020-08-06 15:35:49 +00:00
# My stuff for documentation workflows.
# I mean, documentation is part of the development life, right?
# Mainly includes markup languages and whatnot.
{ config, options, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.dev.documentation;
in
{
options.modules.dev.documentation =
let mkBoolOption = bool: mkOption {
type = types.bool;
default = bool;
}; in {
enable = mkBoolOption false;
2020-08-16 08:33:44 +00:00
# Jupyter does need a bit of setup so separate option.
jupyter.enable = mkBoolOption false;
2020-08-06 15:35:49 +00:00
# Since my usual LaTeX needs are somewhat big, I'm keeping it as a separate option.
latex.enable = mkBoolOption false;
};
config = mkIf cfg.enable {
2020-08-16 08:33:44 +00:00
my.packages = with pkgs; [
asciidoctor # An Asciidoctor document keeps a handful of few frustrated users a day.
aspell # The not-opinionated spell checker.
aspellDicts.en
aspellDicts.en-computers
aspellDicts.en-science
2020-08-06 15:35:49 +00:00
hugo # An SSG for your DDD (documentation-driven development) workflow.
2020-08-16 08:33:44 +00:00
languagetool # A grammar checker with a HUGE data set.
2020-08-06 15:35:49 +00:00
pandoc # The Swiss army knife for document conversion.
2020-08-16 08:33:44 +00:00
vale # The customizable linter for your intended writings.
2020-08-06 15:35:49 +00:00
# TODO: Make Neuron its own package.
(let neuronSrc = builtins.fetchTarball "https://github.com/srid/neuron/archive/master.tar.gz";
in import neuronSrc {}) # Neurons and zettels are good for the brain.
] ++
2020-08-16 08:33:44 +00:00
(if cfg.jupyter.enable then [
jupyter # The interactive notebook.
unstable.iruby # The Ruby kernel for Jupyter.
2020-08-16 08:33:44 +00:00
] else []) ++
2020-08-06 15:35:49 +00:00
(if cfg.latex.enable then [
texlive.combined.scheme-medium # The all-in-one LaTeX distribution for your offline typesetting needs.
] else []);
};
}