From 22b5b2f8f46e0f3befc25f70bae5ec7f07bf4d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Mon, 9 Dec 2019 07:46:11 +0100 Subject: [PATCH] feat: add citation style directory --- configs/packages/writing.nix | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/configs/packages/writing.nix b/configs/packages/writing.nix index 8ba5267..abda2a2 100644 --- a/configs/packages/writing.nix +++ b/configs/packages/writing.nix @@ -1,5 +1,29 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: +let + zoteroStyle = { name, sha256 }: { + name = "${name}.csl"; + path = pkgs.fetchurl { + url = "https://www.zotero.org/styles/${name}"; + inherit sha256; + }; + }; +in { + environment.variables.CITATIONSTYLES = toString (pkgs.linkFarm "citation-styles" [ + (zoteroStyle { + name = "chicago-author-date-de"; + sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s"; + }) + (zoteroStyle { + name = "din-1505-2"; + sha256 = "150kbnxl1r4g1s40khdavv5s6ah10ws135r9k883f6srk78sz6zi"; + }) + (zoteroStyle { + name = "apa"; + sha256 = "1rg41mblmqifba1azb6481dwxhsbl606kf6ysqkqd786f9l9dcf8"; + }) + ]); + environment.systemPackages = with pkgs; [ texlive.combined.scheme-full (aspellWithDicts (dict: [dict.de dict.en dict.en-computers]))