wluma: add systemd user service

This commit is contained in:
Khaïs COLIN 2024-07-30 14:59:19 +02:00
parent b4a69ee0a8
commit 31fd5d3f77

View file

@ -121,8 +121,7 @@
gnumake gnumake
cifs-utils cifs-utils
tailscale tailscale
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wluma
# wget
]; ];
# set global environment variables # set global environment variables
@ -174,6 +173,19 @@
extraUpFlags = [ "--ssh" ]; 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. # Enable the OpenSSH daemon.
# services.openssh.enable = true; # services.openssh.enable = true;