Redshift: Difference between revisions
imported>Voidless Added a section on how to use redshift as a user |
imported>Voidless mNo edit summary |
||
Line 35: | Line 35: | ||
systemctl --user start redshift | systemctl --user start redshift | ||
</syntaxHighlight> | </syntaxHighlight> | ||
Or permanantly enabled by creating | Or permanantly enabled by creating the empty file | ||
<syntaxHighlight lang="shell"> | <syntaxHighlight lang="shell"> | ||
~/.config/systemd/user/default.target.wants/redshift.service | ~/.config/systemd/user/default.target.wants/redshift.service | ||
</syntaxHighlight> | </syntaxHighlight> |
Revision as of 09:01, 3 August 2020
Prerequisites
You can either manually configure a location or specify a location provider such as geoclue2 with the following options:
location.provider
location.latitude
(Used by themanual
provider.)location.longitude
(Used by themanual
provider.)
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