From 31fd5d3f776d8c563530af85816d7ec570a8f649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Tue, 30 Jul 2024 14:59:19 +0200 Subject: [PATCH] wluma: add systemd user service --- nixos/configuration.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 8534035..1dc47e6 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -121,8 +121,7 @@ gnumake cifs-utils tailscale - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget + wluma ]; # set global environment variables @@ -174,6 +173,19 @@ extraUpFlags = [ "--ssh" ]; }; + # enable wluma for automatic brightness adjustment + systemd.user.services.wluma = { + enable = true; + description = "Adjusting screen brightness based on screen contents and amount of ambient light"; + after = [ "graphical-session.target" ]; + partOf = [ "graphical-session.target" ]; + serviceConfig = { + ExecStart = "${pkgs.wluma}/bin/wluma"; + Restart = "always"; + }; + wantedBy = [ "graphical-session.target" ]; + }; + # Enable the OpenSSH daemon. # services.openssh.enable = true;