1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

skim: add package option (#2619)

Fixes #2618
This commit is contained in:
Olli Helenius 2022-01-09 05:53:49 +02:00 committed by GitHub
parent c751aeb19e
commit a90ddcd627
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,13 @@ in {
options.programs.skim = { options.programs.skim = {
enable = mkEnableOption "skim - a command-line fuzzy finder"; enable = mkEnableOption "skim - a command-line fuzzy finder";
package = mkOption {
type = types.package;
default = pkgs.skim;
defaultText = literalExpression "pkgs.skim";
description = "Package providing the <command>skim</command> tool.";
};
defaultCommand = mkOption { defaultCommand = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
@ -102,7 +109,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = [ pkgs.skim ]; home.packages = [ cfg.package ];
home.sessionVariables = mapAttrs (n: v: toString v) home.sessionVariables = mapAttrs (n: v: toString v)
(filterAttrs (n: v: v != [ ] && v != null) { (filterAttrs (n: v: v != [ ] && v != null) {