lf: add package option

PR #2883
This commit is contained in:
Tanish2002 2022-04-10 17:35:29 +05:30 committed by Robert Helgesson
parent e39a9d0103
commit 7da4e6680f
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -58,6 +58,15 @@ in {
programs.lf = { programs.lf = {
enable = mkEnableOption "lf"; enable = mkEnableOption "lf";
package = mkOption {
type = types.package;
default = pkgs.lf;
defaultText = literalExpression "pkgs.lf";
description = ''
lf package to use.
'';
};
settings = mkOption { settings = mkOption {
type = lfSettingsType; type = lfSettingsType;
default = { }; default = { };
@ -169,7 +178,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = [ pkgs.lf ]; home.packages = [ cfg.package ];
xdg.configFile."lf/lfrc".text = let xdg.configFile."lf/lfrc".text = let
fmtSetting = k: v: fmtSetting = k: v: