move more modules to home

This commit is contained in:
Tristan 2024-01-05 20:59:06 +00:00
parent 9f0cee2627
commit f893e3b8e2
18 changed files with 443 additions and 484 deletions

34
lib/modules/home/menu.nix Normal file
View 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];
};
}