Skip to content

Commit

Permalink
home/services/wayland/wluma: init
Browse files Browse the repository at this point in the history
  • Loading branch information
fufexan committed Aug 29, 2024
1 parent d40824d commit 2febe73
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions home/profiles/io/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
../../services/wayland/gammastep.nix
../../services/wayland/hyprpaper.nix
../../services/wayland/hypridle.nix
../../services/wayland/wluma.nix

# terminal emulators
../../terminal/emulators/foot.nix
Expand Down
47 changes: 47 additions & 0 deletions home/services/wayland/wluma.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
pkgs,
lib,
...
}: {
systemd.user.services.wluma = {
Unit = {
Description = "Automatic backlight control";
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = lib.getExe pkgs.wluma;
Restart = "on-failure";
};
Install.WantedBy = ["graphical-session.target"];
};

xdg.configFile."wluma/config.toml".source = (pkgs.formats.toml {}).generate "wluma-config" {
als.iio = {
path = "/sys/bus/iio/devices";
thresholds = {
"0" = "night";
"20" = "dark";
"250" = "normal";
"500" = "bright";
"80" = "dim";
"800" = "outdoors";
};
};

output.backlight = [
{
capturer = "none";
name = "eDP-1";
path = "/sys/class/backlight/amdgpu_bl0";
}
];

# need to fix ddcutil first
# output.ddcutil = [
# {
# capturer = "none";
# name = "BenQ BL2283";
# }
# ];
};
}

0 comments on commit 2febe73

Please sign in to comment.