
Before commit 54fa0cfe4eef7e54e23380704af70ee7b65473ce, the `redshift` service was run with the environment variable `DISPLAY` set to `:0`. Commit 54fa0cfe4eef7e54e23380704af70ee7b65473ce changed this to instead use the value of the `services.xserver.display` configuration option in the value of the `DISPLAY` variable. In so doing, no default value was provided for the case where `services.xserver.display` is `null`. While the default value of `services.xserver.display` is `0`, use of which by the `redshift` module would result in `DISPLAY` again being set to `:0`, `services.xserver.display` may also be `null`, to which value it is set by, e.g., the `lightdm` module. In the case that `services.xserver.display` is `null`, with the change made in commit 54fa0cfe4eef7e54e23380704af70ee7b65473ce, the `DISPLAY` variable in the environment of the `redshift` service would be set to `:` (a single colon), which, according to my personal experience, would result in — - the `redshift` service failing to start; and - systemd repeatedly attempting to restart the `redshift` service, looping indefinitely, while the hapless `redshift` spews error messages into the journal. It can be observed that the malformed value of `DISPLAY` is likely at fault for this issue by executing the following commands in an ordinary shell, with a suitable `redshift` executable, and the X11 display not already tinted: - `redshift -O 2500` — This command should reduce the color temperature of the display (making it more reddish). - `DISPLAY=':' redshift -O 6500` — This command should raise the color temperature back up, were it not for the `DISPLAY` environment variable being set to `:` for it, which should cause it to, instead, fail with several error messages. This commit attempts to fix this issue by having the `DISPLAY` environment variable for the `redshift` service default to its old value of `:0` in the case that `services.xserver.display` is `null`. I have tested this solution on NixOS, albeit without the benefit of a system with multiple displays.
Nixpkgs is a collection of packages for the Nix package manager. It is periodically built and tested by the hydra build daemon as so-called channels. To get channel information via git, add nixpkgs-channels as a remote:
% git remote add channels git://github.com/NixOS/nixpkgs-channels.git
For stability and maximum binary package support, it is recommended to maintain
custom changes on top of one of the channels, e.g. nixos-16.03
for the latest
release and nixos-unstable
for the latest successful build of master:
% git remote update channels
% git rebase channels/nixos-16.03
For pull-requests, please rebase onto nixpkgs master
.
NixOS linux distribution source code is located inside
nixos/
folder.
- NixOS installation instructions
- Documentation (Nix Expression Language chapter)
- Manual (How to write packages for Nix)
- Manual (NixOS)
- Nix Wiki (deprecated, see milestone "Move the Wiki!")
- Continuous package builds for unstable/master
- Continuous package builds for 16.03 release
- Tests for unstable/master
- Tests for 16.03 release
Communication:
Description
Languages
Nix
96.3%
Shell
1.8%
Python
0.7%
Perl
0.4%
C
0.3%
Other
0.1%