Redshift: Difference between revisions

imported>Andriokha
No edit summary
imported>Voidless
Added a section on how to use redshift as a user
Line 11: Line 11:
Enable <syntaxhighlight lang="nix" inline>services.redshift</syntaxhighlight>.
Enable <syntaxhighlight lang="nix" inline>services.redshift</syntaxhighlight>.
Example snippet of <code>configuration.nix</code>:
Example snippet of <code>configuration.nix</code>:
<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix> ...
{ config, pkgs, callPackage, ... }: {
{ config, pkgs, callPackage, ... }: {
   ...
   ...
Line 28: Line 28:
   };
   };
};
};
</syntaxHighlight>
== Usage ==
If <syntaxhighlight lang="nix" inline>services.redshift.enable</syntaxhighlight> is true, the systemd unit <syntaxhighlight inline>redshift.service</syntaxhighlight> is provided. It can either be started by the user level service manager like this:
<syntaxHighlight lang="shell">
systemctl --user start redshift
</syntaxHighlight>
Or permanantly enabled by creating an empty file at
<syntaxHighlight lang="shell">
~/.config/systemd/user/default.target.wants/redshift.service
</syntaxHighlight>
</syntaxHighlight>