redshift/gammastep: Unify common options#1749
Conversation
b39a03c to
9361770
Compare
Nowadays services.{redshift,gammastep} modules are really similar. They
should, since Gammastep is a fork of Redshift with the main objective is
to support Wayland.
So instead of trying to maintain two separate modules, this commit unify
the options in lib/options.nix file, making the implementation of the
module itself ends up being really simple (just calling the common
options with the necessary parameters to differentiate between them).
9361770 to
7de0d07
Compare
|
Did some improvements in tests so we make sure that this commit is not breaking anything. |
|
CC @rycee @petabyteboy . |
|
Thanks! Merged to master. I suspect that if gammastep supports both X and Wayland then we may want to consider removing the redshift module entirely but perhaps it's best to wait a while to see how the two projects develop. In any case, thanks for the contribution! |
|
Description
Nowadays
services.{redshift,gammastep}modules are really similar. They should, since Gammastep is a fork of Redshift with the main objective is to support Wayland.So instead of trying to maintain two separate modules, this commit unify the options in lib/options.nix file, while the implementation of the module itself ends up being really simple (just calling the common options with the necessary parameters to differentiate between them).
My reasoning for this is to make maintaining the modules easier, but also I want to update the modules to use config file instead of passing parameters via command-line, since this will allow it to support options not supported currently. Modifying both modules separately would be very error prone, so I decided to first unify them and afterwards I can open another PR migrating them to the config file.
Checklist
Change is backwards compatible.
Code formatted with
./format.Code tested through
nix-shell --pure tests -A run.all.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Added myself as module maintainer. See example.
Added myself and the module files to
.github/CODEOWNERS.