moar modules
This commit is contained in:
parent
a1175ba492
commit
011009d22f
17 changed files with 556 additions and 240 deletions
34
lib/modules/menu.nix
Normal file
34
lib/modules/menu.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ user }: { lib, pkgs, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.programs.menu;
|
||||
terminal = config.programs.terminal.package;
|
||||
termcmd = "${terminal}/bin/${terminal.pname}";
|
||||
in
|
||||
{
|
||||
options.programs = {
|
||||
menu = {
|
||||
enable = mkEnableOption "menu";
|
||||
package = mkPackageOption pkgs "wofi" {
|
||||
example = "pkgs.dmenu-wayland";
|
||||
};
|
||||
dmenuCommand = mkOption {
|
||||
default = "/bin/wofi --show dmenu";
|
||||
example = "/bin/dmenu";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${user}.imports = [{
|
||||
programs.wofi = mkIf cfg.package == pkgs.wofi {
|
||||
enable = true;
|
||||
settings = {
|
||||
term = termcmd;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
}];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue