mirror of
https://github.com/nix-community/home-manager
synced 2024-11-16 16:19:44 +01:00
2f2a4396c6
Adds 'programs.lf', configuration managment for lf, a terminal file manager. PR #1174
43 lines
623 B
Nix
43 lines
623 B
Nix
{ 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; };
|
|
};
|
|
|
|
nixpkgs.overlays =
|
|
[ (self: super: { lf = pkgs.writeScriptBin "dummy-lf" ""; }) ];
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/lf/lfrc
|
|
assertFileContent home-files/.config/lf/lfrc ${expected}
|
|
'';
|
|
};
|
|
}
|