1
0
Fork 0
nix-configuration/modules/nixos/apps/writing/default.nix

32 lines
706 B
Nix
Raw Permalink Normal View History

{
pkgs,
config,
lib,
2024-12-06 18:04:47 +00:00
namespace,
...
}:
2024-05-02 01:10:26 +00:00
let
2024-12-06 18:04:47 +00:00
cfg = config.${namespace}.apps.writing;
compile-manuscript = pkgs.writeShellScriptBin "compile-manuscript" (
builtins.readFile (lib.snowfall.fs.get-file "bin/compile-manuscript.sh")
);
2024-05-02 01:10:26 +00:00
in
{
options = {
2024-12-06 18:04:47 +00:00
${namespace}.apps.writing.enable = lib.mkEnableOption "Enables writing and editing tools";
};
2024-05-02 01:10:26 +00:00
config = lib.mkIf cfg.enable {
# Install packages for building ebooks
environment.systemPackages = with pkgs; [
haskellPackages.pandoc
haskellPackages.pandoc-cli
haskellPackages.pandoc-crossref
(texlive.combine { inherit (texlive) scheme-small draftwatermark; })
compile-manuscript
];
};
}