nix/modules/stuff/dunst.nix

35 lines
835 B
Nix
Raw Normal View History

2024-08-01 21:22:47 +02:00
{ lib, pkgs, config, ... }: let
inherit (lib) mkIf mkEnableOption mkOption types;
cfg = config.chuj.stuff.dunst;
user = config.chuj.system.user;
in {
options.chuj.stuff.dunst = {
enable = mkEnableOption "dunst";
output = mkOption {
type = types.str;
default = null;
};
side = mkOption {
type = types.str;
default = "right";
};
};
config = mkIf cfg.enable {
home-manager.users.${user}.services.dunst = {
enable = true;
settings = {
global = {
monitor = if cfg.output != null then cfg.output else 0;
origin = "bottom-${cfg.side}";
frame_width = 1;
background = "#333333";
foreground = "#feeeee";
font = "JetBrains Mono NL 10";
frame_color = "#4c7899";
};
};
};
};
}