From 36c9c7a90df4cd2fa278a0cf63e9025a1c3413cd Mon Sep 17 00:00:00 2001 From: Jan Bulthuis Date: Fri, 19 Jul 2024 00:36:02 +0200 Subject: [PATCH] Added mako modue --- modules/users/modules/default.nix | 1 + modules/users/modules/feishin/default.nix | 5 +++-- modules/users/modules/mako/default.nix | 25 +++++++++++++++++++++++ modules/users/modules/theming/default.nix | 4 ++++ users/jan.nix | 2 ++ users/janMerged.nix | 24 +++++++++++----------- 6 files changed, 47 insertions(+), 14 deletions(-) create mode 100644 modules/users/modules/mako/default.nix diff --git a/modules/users/modules/default.nix b/modules/users/modules/default.nix index 915fce4..95e2159 100644 --- a/modules/users/modules/default.nix +++ b/modules/users/modules/default.nix @@ -9,6 +9,7 @@ ./firefox/default.nix ./fontconfig/default.nix ./foot/default.nix + ./mako/default.nix ./obsidian/default.nix ./shell/bash.nix ./shell/fish.nix diff --git a/modules/users/modules/feishin/default.nix b/modules/users/modules/feishin/default.nix index 1684002..4f03ca9 100644 --- a/modules/users/modules/feishin/default.nix +++ b/modules/users/modules/feishin/default.nix @@ -1,11 +1,12 @@ {config, lib, pkgs, ... }: +with lib; let cfg = config.modules.feishin; in { - options.modules.feishin.enable = lib.mkEnableOption "feishin"; + options.modules.feishin.enable = mkEnableOption "feishin"; - config = lib.mkIf cfg.enable { + config = mkIf cfg.enable { home.packages = with pkgs; [ feishin ]; diff --git a/modules/users/modules/mako/default.nix b/modules/users/modules/mako/default.nix new file mode 100644 index 0000000..58f5452 --- /dev/null +++ b/modules/users/modules/mako/default.nix @@ -0,0 +1,25 @@ +{config, lib, pkgs, ... }: + +with lib; +let + cfg = config.modules.mako; + theme = config.theming; + colors = theme.colors; +in { + options.modules.mako.enable = mkEnableOption "mako"; + + config = mkIf cfg.enable { + services.mako = { + enable = true; + anchor = "top-right"; + defaultTimeout = 5000; + backgroundColor = "#${colors.bg}ff"; + textColor = "#${colors.fg}ff"; + borderColor = "#${colors.fg}ff"; + progressColor = "#${colors.accent}ff"; + borderRadius = 0; + borderSize = theme.layout.borderSize; + font = "${theme.fonts.monospace.name} ${toString theme.fonts.monospace.recommendedSize}"; + }; + }; +} \ No newline at end of file diff --git a/modules/users/modules/theming/default.nix b/modules/users/modules/theming/default.nix index bdfffec..c30a3b9 100644 --- a/modules/users/modules/theming/default.nix +++ b/modules/users/modules/theming/default.nix @@ -119,6 +119,10 @@ in { type = types.str; default = colors.base05; }; + accent = mkOption { + type = types.str; + default = colors.base09; + }; focused = mkOption { type = types.str; default = cfg.colors.fg; diff --git a/users/jan.nix b/users/jan.nix index 4ab5ff4..c01737a 100644 --- a/users/jan.nix +++ b/users/jan.nix @@ -24,6 +24,8 @@ # Programs feishin.enable = true; firefox.enable = true; + foot.enable = true; + mako.enable = true; vscode.enable = true; zathura.enable = true; fish.enable = true; diff --git a/users/janMerged.nix b/users/janMerged.nix index 47c273d..cbe63c2 100644 --- a/users/janMerged.nix +++ b/users/janMerged.nix @@ -529,18 +529,18 @@ in { # }; # Mako notifications setup - services.mako = { - enable = true; - anchor = "top-right"; - defaultTimeout = 5000; - backgroundColor = "#${colors.base00}ff"; - textColor = "#${colors.base05}ff"; - borderColor = "#${colors.base05}ff"; - progressColor = "#${colors.base09}ff"; - borderRadius = 0; - borderSize = borderSize; - font = "${fonts.monospace.name} ${toString fonts.sizes.terminal}"; - }; + # services.mako = { + # enable = true; + # anchor = "top-right"; + # defaultTimeout = 5000; + # backgroundColor = "#${colors.base00}ff"; + # textColor = "#${colors.base05}ff"; + # borderColor = "#${colors.base05}ff"; + # progressColor = "#${colors.base09}ff"; + # borderRadius = 0; + # borderSize = borderSize; + # font = "${fonts.monospace.name} ${toString fonts.sizes.terminal}"; + # }; # Waybar setup programs.waybar = {