2020-04-18 20:22:09 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
pvScript = builtins.toFile "pv.sh" "cat $1";
|
|
|
|
expected = builtins.toFile "settings-expected" ''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set previewer ${pvScript}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# More config...
|
|
|
|
|
|
|
|
'';
|
|
|
|
in {
|
|
|
|
config = {
|
|
|
|
programs.lf = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
# More config...
|
|
|
|
'';
|
|
|
|
|
|
|
|
previewer = { source = pvScript; };
|
|
|
|
};
|
|
|
|
|
2021-09-26 11:08:45 +02:00
|
|
|
test.stubs.lf = { };
|
2020-04-18 20:22:09 +02:00
|
|
|
|
|
|
|
nmt.script = ''
|
|
|
|
assertFileExists home-files/.config/lf/lfrc
|
|
|
|
assertFileContent home-files/.config/lf/lfrc ${expected}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|