fork/home-manager
git clone https://git.julia.blue/fork/home-manager
406d34d9
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6pvScript = builtins . toFile "pv.sh" "cat $1" ; 7expected = builtins . toFile "settings-expected" '' 8set icons 9set noignorecase 10set ratios "2:2:3" 11set tabstop 4 12 13cmd added :echo "foo" 14cmd multiline :{{ 15push gg 16echo "bar" 17push i 18}} 19cmd removed 20 21map aa should-be-added 22map ab 23 24cmap <c-a> should-be-added 25cmap <c-b> 26 27set previewer ${ pvScript } 28map i ${ "$" }${ pvScript } "$f" | less -R 29 30 31 32# More config... 33 34'' ; 35in { 36config = { 37programs . lf = { 38enable = true ; 39 40cmdKeybindings = { 41"<c-a>" = "should-be-added" ; 42"<c-b>" = null ; 43}; 44 45commands = { 46added = '':echo "foo"'' ; 47removed = null ; 48multiline = '' 49:{{ 50push gg 51echo "bar" 52push i 53}}'' ; 54}; 55 56extraConfig = '' 57# More config... 58'' ; 59 60keybindings = { 61aa = "should-be-added" ; 62ab = null ; 63}; 64 65previewer = { 66keybinding = "i" ; 67source = pvScript ; 68}; 69 70settings = { 71ignorecase = false ; 72icons = true ; 73tabstop = 4 ; 74ratios = [ 2 2 3 ]; 75}; 76}; 77 78test . stubs . lf = { }; 79 80nmt . script = '' 81assertFileExists home-files/.config/lf/lfrc 82assertFileContent home-files/.config/lf/lfrc ${ expected } 83'' ; 84}; 85}