aboutsummaryrefslogtreecommitdiffstats
path: root/modules/desktop/mako
diff options
context:
space:
mode:
Diffstat (limited to 'modules/desktop/mako')
-rw-r--r--modules/desktop/mako/colors.nix21
-rw-r--r--modules/desktop/mako/default.nix39
2 files changed, 60 insertions, 0 deletions
diff --git a/modules/desktop/mako/colors.nix b/modules/desktop/mako/colors.nix
new file mode 100644
index 0000000..0ba4d33
--- /dev/null
+++ b/modules/desktop/mako/colors.nix
@@ -0,0 +1,21 @@
+# Colorscheme for mako
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+{
+ config.services.mako.settings = lib.mkIf config.desktop.mako.enable (
+ let
+ base16Colors = import ../../colors/base16 { inherit config lib pkgs; };
+ in
+ with base16Colors.colorsWithHashPrefix;
+ {
+ background-color = base00;
+ text-color = base05;
+ border-color = base05;
+ progress-color = base0C;
+ }
+ );
+}
diff --git a/modules/desktop/mako/default.nix b/modules/desktop/mako/default.nix
new file mode 100644
index 0000000..2123b57
--- /dev/null
+++ b/modules/desktop/mako/default.nix
@@ -0,0 +1,39 @@
+# mako notification daemon
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+{
+ imports = [ ./colors.nix ];
+
+ options.desktop.mako = {
+ enable = lib.mkEnableOption "Enables mako.";
+ package = lib.mkOption {
+ type = lib.types.package;
+ readOnly = true;
+ default = config.services.mako.package or pkgs.mako;
+ description = "The mako package to use.";
+ };
+ };
+
+ config = lib.mkIf config.desktop.mako.enable {
+ services.mako = {
+ enable = true;
+ settings = {
+ font = "${config.fonts.normal} ${toString config.fonts.size}";
+ margin = 10;
+ padding = 8;
+ border-size = 1;
+ border-radius = 0;
+ max-icon-size = 32;
+ icons = true;
+ markup = true;
+ actions = true;
+ format = "<b>%s</b>\\n%b";
+ default-timeout = 5000;
+ };
+ };
+ };
+}