Redshift: Difference between revisions

From NixOS Wiki
imported>Voidless
mNo edit summary
imported>Garbas
mNo edit summary
Line 3: Line 3:
You can either manually configure a location or specify a location provider such as geoclue2 with the following options:
You can either manually configure a location or specify a location provider such as geoclue2 with the following options:


* [https://nixos.org/nixos/options.html#location.provider {{ic|location.provider}}]
* [https://search.nixos.org/options/?query=location.provider {{ic|location.provider}}]
* [https://nixos.org/nixos/options.html#location.latitude {{ic|location.latitude}}] (Used by the {{ic|manual}} provider.)
* [https://search.nixos.org/options/?query=location.latitude {{ic|location.latitude}}] (Used by the {{ic|manual}} provider.)
* [https://nixos.org/nixos/options.html#location.longitude {{ic|location.longitude}}] (Used by the {{ic|manual}} provider.)
* [https://search.nixos.org/options/?query=location.longitude {{ic|location.longitude}}] (Used by the {{ic|manual}} provider.)


== Installation ==
== Installation ==

Revision as of 21:45, 24 September 2020

Prerequisites

You can either manually configure a location or specify a location provider such as geoclue2 with the following options:

Installation

Enable services.redshift. Example snippet of configuration.nix:

  ...
{ config, pkgs, callPackage, ... }: {
  ...
  # All values except 'enable' are optional.
  services.redshift = {
    enable = true;
    brightness = {
      # Note the string values below.
      day = "1";
      night = "1";
    };
    temperature = {
      day = 5500;
      night = 3700;
    };
  };
};

Usage

If services.redshift.enable is true, the systemd unit redshift.service is provided. It can either be started by the user level service manager like this:

systemctl --user start redshift

Or permanantly enabled by creating the empty file

~/.config/systemd/user/default.target.wants/redshift.service