diff options
Diffstat (limited to 'home-modules/desktop/wayland/mako.nix')
| -rw-r--r-- | home-modules/desktop/wayland/mako.nix | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/home-modules/desktop/wayland/mako.nix b/home-modules/desktop/wayland/mako.nix index 9b13e77..99987db 100644 --- a/home-modules/desktop/wayland/mako.nix +++ b/home-modules/desktop/wayland/mako.nix @@ -1,47 +1,48 @@ { - pkgs, + pkgs, config, lib, ... }: let - cfg = config.homeprogs.mako; -in + cfg = config.homeprogs.mako; +in { - options.homeprogs.mako = { + options.homeprogs.mako = { enable = lib.mkEnableOption "Enable Mako notification manager"; systemdWantedBy = lib.mkOption { description = "SystemD targets where mako should start for."; - default = [ "graphical-session.target"]; - example = [ "hyprland-session.target" ]; - type = lib.types.listOf lib.types.str; - }; + # TODO: Put a null here, so that we can add a non-persistent default + default = [ ]; + example = [ "hyprland-session.target" ]; + type = lib.types.listOf lib.types.str; + }; package = lib.mkOption { description = "mako package to use"; - default = pkgs.mako; - example = pkgs.mako; - type = lib.types.package; + default = pkgs.mako; + example = pkgs.mako; + type = lib.types.package; }; - }; + }; config = lib.mkIf config.homeprogs.mako.enable ({ - home.packages = [ pkgs.mako ]; - xdg.configFile."mako/config" = { + home.packages = [ pkgs.mako ]; + xdg.configFile."mako/config" = { onChange = "${pkgs.mako}/bin/makoctl reload || true"; source = ./mako.ini; }; - systemd.user.services.mako = { + systemd.user.services.mako = { Install.WantedBy = config.homeprogs.mako.systemdWantedBy; Unit = { Description = "Lightweight Wayland notification daemon"; - Documentation="man:mako(1)"; - After= "graphical-session.target"; - } ; + Documentation = "man:mako(1)"; + After = "graphical-session.target"; + }; Service = { Type = "dbus"; BusName = "org.freedesktop.Notifications"; - ExecCondition="/bin/sh -c '[ -n \"$WAYLAND_DISPLAY\" ]'"; - ExecStart="${cfg.package}/bin/mako"; - ExecReload="${cfg.package}/bin/makoctl reload"; + ExecCondition = "/bin/sh -c '[ -n \"$WAYLAND_DISPLAY\" ]'"; + ExecStart = "${cfg.package}/bin/mako"; + ExecReload = "${cfg.package}/bin/makoctl reload"; }; }; }); |
