nix/home/modules/menu.nix

34 lines
656 B
Nix

{
lib,
pkgs,
config,
...
}: let
cfg = config.programs.menu;
terminal = config.programs.terminal;
termcmd = "${terminal}/bin/${terminal.pname}";
in {
options.programs = with lib; {
menu = {
package = mkPackageOption pkgs "wofi" {
example = "pkgs.dmenu-wayland";
};
dmenuCommand = mkOption {
default = "/bin/wofi --show dmenu";
example = "/bin/dmenu";
};
};
};
config = {
programs.wofi = lib.mkIf (cfg.package == pkgs.wofi) {
enable = true;
settings = {
term = termcmd;
insensitive = true;
};
};
home.packages = [cfg.package];
};
}