nixos/home/david/modules/programs/wluma.nix

60 lines
1.2 KiB
Nix
Raw Normal View History

2025-07-06 08:58:26 +08:00
{
lib,
config,
options,
...
2025-07-13 06:04:55 +08:00
}:
let
2025-07-06 08:58:26 +08:00
cfg = config.david.programs.wluma;
2025-07-13 06:04:55 +08:00
in
{
2025-07-06 08:58:26 +08:00
options = {
david.programs.wluma = {
enable = lib.mkEnableOption "wluma";
extraSettings = lib.mkOption {
inherit (options.services.wluma.settings) type;
example = ''
output = {
backlight = [
{
name = "eDP-1";
path = "/sys/class/backlight/nvidia_0";
capturer = "wayland";
}
{
name = "DP-1";
path = "/sys/class/backlight/ddcci13";
capturer = "wayland";
}
];
};
'';
};
};
};
config = lib.mkIf cfg.enable {
services.wluma = {
enable = true;
2025-07-13 06:04:55 +08:00
settings = {
als = {
webcam = {
video = 0;
thresholds = {
"0" = "night";
"15" = "dark";
"30" = "dim";
"45" = "normal";
"60" = "bright";
"75" = "outdoors";
2025-07-06 08:58:26 +08:00
};
};
2025-07-13 06:04:55 +08:00
};
}
// cfg.extraSettings;
2025-07-06 08:58:26 +08:00
systemd = {
enable = true;
};
};
};
}