Jump to content

Wlsunset: Difference between revisions

From Official NixOS Wiki
Phobos (talk | contribs)
Created a page for wlsunset
 
Klinger (talk | contribs)
 
(2 intermediate revisions by one other user not shown)
Line 7: Line 7:
];|name=/etc/nixos/configuration.nix|lang=nix}}
];|name=/etc/nixos/configuration.nix|lang=nix}}


== Home Manager ==
== Home Manager Configuration ==
Configuration options may be found in Home Manager options under [https://mynixos.com/home-manager/options/services.wlsunset services.wlsunset]. An example configuration:
Configuration options may be found in [https://nix-community.github.io/home-manager/options.xhtml#opt-services.wlsunset.enable Home Manager - services.wlsunset]. An example configuration:
{{File|3=services.wlsunset = {
{{File|3=services.wlsunset = {
   enable = true;
   enable = true;
Line 20: Line 20:
   sunset = "18:00";
   sunset = "18:00";


   gamma = 1.0;
   #gamma = 1.0;
    
    
   #For location based sunrise/sunset
   #For location based sunrise/sunset
Line 27: Line 27:
   #longitude = 91.7;
   #longitude = 91.7;
};|name=/etc/nixos/home.nix|lang=nix}}
};|name=/etc/nixos/home.nix|lang=nix}}
[[Category:Configuration]]
[[Category:Wayland]]

Latest revision as of 13:19, 29 December 2025

wlsunset is a service that adjusts screen temperature and gamma adjustments depending on time of day. It works specifically with Wayland compositors supporting wlr-gamma-control-unstable-v1.

Installation

wlsunset can be installed simply as a package:

❄︎ /etc/nixos/configuration.nix
environment.systemPackages = [
  pkgs.wlsunset
];

Home Manager Configuration

Configuration options may be found in Home Manager - services.wlsunset. An example configuration:

❄︎ /etc/nixos/home.nix
services.wlsunset = {
  enable = true;

  temperature = {
    day = 6500;
    night = 3000;
  };

  sunrise = "06:00";
  sunset = "18:00";

  #gamma = 1.0;
  
  #For location based sunrise/sunset
  #
  #latitude = 23.5;
  #longitude = 91.7;
};