Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/fzf: add package option, fix ordering, and other cleanup #303201

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions nixos/modules/programs/fzf.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{ pkgs, config, lib, ... }:

with lib;

let
inherit (lib) maintainers;
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf mkRemovedOptionModule;
inherit (lib.options) mkEnableOption;
inherit (lib.strings) optionalString;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take the functions from lib. Where they are exactly is an implementation detail and just complicates things here.

Also we would avoid maintaining this list of functions by just prefixing the functions with lib.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where they are exactly is an implementation detail

Being explicit is always better. And as we know there are many functions not even exposed at the top level or have the same name in multiple scopes.


cfg = config.programs.fzf;

in
{
imports = [
(lib.mkRemovedOptionModule [ "programs" "fzf" "keybindings" ] ''
(mkRemovedOptionModule [ "programs" "fzf" "keybindings" ] ''
Use "programs.fzf.enable" instead; due to fzf upstream changes, it's not possible to load shell-completion and keybindings separately.
If you want to change/disable certain keybindings, please check the fzf documentation.
'')
(lib.mkRemovedOptionModule [ "programs" "fzf" "fuzzyCompletion" ] ''
(mkRemovedOptionModule [ "programs" "fzf" "fuzzyCompletion" ] ''
Use "programs.fzf.enable" instead; due to fzf upstream changes, it's not possible to load shell-completion and keybindings separately.
If you want to change/disable certain keybindings, please check the fzf documentation.
'')
Expand Down