move more modules to home
This commit is contained in:
parent
9f0cee2627
commit
f893e3b8e2
18 changed files with 443 additions and 484 deletions
34
lib/modules/home/menu.nix
Normal file
34
lib/modules/home/menu.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
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];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue