refactor(homeModules/cli): extract fzf to finder module=
This commit is contained in:
parent
42cfd252f8
commit
9b6a92f9db
3 changed files with 13 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
||||||
{
|
{
|
||||||
cli = {
|
cli = {
|
||||||
shell = "zsh";
|
shell = "zsh";
|
||||||
|
finder = "fzf";
|
||||||
screensaver.enable = true;
|
screensaver.enable = true;
|
||||||
screensaver.timeout = "100";
|
screensaver.timeout = "100";
|
||||||
screensaver.command = "cbonsai -S -w 0.1 -L 40 -M 2 -b 2";
|
screensaver.command = "cbonsai -S -w 0.1 -L 40 -M 2 -b 2";
|
||||||
|
@ -39,9 +40,5 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
};
|
};
|
||||||
fzf = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
{
|
{
|
||||||
options.cli = {
|
options.cli = {
|
||||||
shell = lib.pantheon.mkStrOption;
|
shell = lib.pantheon.mkStrOption;
|
||||||
|
finder = lib.pantheon.mkStrOption;
|
||||||
screensaver.enable = lib.mkEnableOption "";
|
screensaver.enable = lib.mkEnableOption "";
|
||||||
screensaver.timeout = lib.pantheon.mkStrOption;
|
screensaver.timeout = lib.pantheon.mkStrOption;
|
||||||
screensaver.command = lib.pantheon.mkStrOption;
|
screensaver.command = lib.pantheon.mkStrOption;
|
||||||
|
|
11
modules/home/cli/finder/default.nix
Normal file
11
modules/home/cli/finder/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
config = lib.mkMerge [
|
||||||
|
(lib.mkIf (config.cli.finder == "fzf") {
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = lib.mkIf (config.cli.shell == "zsh") true;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue