refactor: removing needless module complexity
This commit is contained in:
23
modules/home/programs/waybar/default.nix
Normal file
23
modules/home/programs/waybar/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.home.programs.waybar;
|
||||
in {
|
||||
options = {
|
||||
home.programs.waybar.enable = mkEnableOption "Enables waybar";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
systemd.user.services.waybar = {
|
||||
Unit.StartLimitBurst = 30;
|
||||
};
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
systemd.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user