From 96301914a921f0e211d112109b7089c2f6d411e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 14 Oct 2020 20:12:29 +0200 Subject: [PATCH] feat(writing): adapt csl dirs to new pandoc --- configs/packages/writing.nix | 47 ++++++++++++++++++++---------------- dot/init.vim | 2 +- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/configs/packages/writing.nix b/configs/packages/writing.nix index 8250a1e..c81d51e 100644 --- a/configs/packages/writing.nix +++ b/configs/packages/writing.nix @@ -7,6 +7,28 @@ let inherit sha256; }; }; + + cslDirectory = pkgs.linkFarm "citation-styles" [ + (zoteroStyle { + name = "chicago-author-date-de"; + sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s"; + }) + (zoteroStyle { + name = "din-1505-2"; + sha256 = if scardanelli then + "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq" + else + "150kbnxl1r4g1s40khdavv5s6ah10ws135r9k883f6srk78sz6zi"; + }) + (zoteroStyle { + name = "apa"; + sha256 = if scardanelli then + "0g8vhp7gnd315h5b60r3zqp49kaq3fkxqnz2v7j2a0zp6s3cisdk" + else + "1rg41mblmqifba1azb6481dwxhsbl606kf6ysqkqd786f9l9dcf8"; + }) + ]; + makeStardictDataDir = dicts: pkgs.linkFarm "dictionaries" (map ({ name, path }: { name = "dic/${name}"; @@ -38,27 +60,10 @@ in { } ]); - environment.variables.CITATIONSTYLES = toString - (pkgs.linkFarm "citation-styles" [ - (zoteroStyle { - name = "chicago-author-date-de"; - sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s"; - }) - (zoteroStyle { - name = "din-1505-2"; - sha256 = if scardanelli then - "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq" - else - "150kbnxl1r4g1s40khdavv5s6ah10ws135r9k883f6srk78sz6zi"; - }) - (zoteroStyle { - name = "apa"; - sha256 = if scardanelli then - "0g8vhp7gnd315h5b60r3zqp49kaq3fkxqnz2v7j2a0zp6s3cisdk" - else - "1rg41mblmqifba1azb6481dwxhsbl606kf6ysqkqd786f9l9dcf8"; - }) - ]); + home-manager.users.me.home.file = { + ".csl".source = cslDirectory; + ".local/share/pandoc/csl".source = cslDirectory; # as of pandoc 2.11, it includes citeproc + }; environment.systemPackages = with pkgs; [ texlive.combined.scheme-full diff --git a/dot/init.vim b/dot/init.vim index 8ecf552..f74435e 100644 --- a/dot/init.vim +++ b/dot/init.vim @@ -140,7 +140,7 @@ if has("autocmd") autocmd filetype make setlocal noexpandtab autocmd filetype html packadd emmet-vim autocmd filetype gitcommit setlocal spell spelllang=en - autocmd filetype mail setlocal spell spelllang=de textwidth=0 + autocmd filetype mail setlocal spell spelllang=de textwidth=0 | command Send %! mail-send autocmd bufreadpost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal! g`\"" |