mirror of
https://github.com/nix-community/home-manager
synced 2024-11-15 23:59:45 +01:00
d8dd2a09b0
Not every option is exposed by redshift/gammastep parameters, for example gamma options are only exposed in configuration file. So this PR refactors this module to generate a configuration file and pass it to the redshift/gammastep using -c parameter. This is a breaking change since there is no support for some of the older options like `extraOptions`, but unless you use `extraOptions` it should work without changes.
24 lines
625 B
Nix
24 lines
625 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
commonOptions = import ./lib/options.nix {
|
|
inherit config lib pkgs;
|
|
|
|
moduleName = "redshift";
|
|
programName = "Redshift";
|
|
mainSection = "redshift";
|
|
defaultPackage = pkgs.redshift;
|
|
examplePackage = "pkgs.redshift";
|
|
mainExecutable = "redshift";
|
|
appletExecutable = "redshift-gtk";
|
|
xdgConfigFilePath = "redshift/redshift.conf";
|
|
serviceDocumentation = "http://jonls.dk/redshift/";
|
|
};
|
|
|
|
in {
|
|
meta = commonOptions.meta;
|
|
options.services.redshift = commonOptions.options;
|
|
config = mkIf config.services.redshift.enable commonOptions.config;
|
|
}
|