1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-15 23:59:45 +01:00
home-manager/modules/services/redshift-gammastep/gammastep.nix
Thiago Kenji Okada d8dd2a09b0
redshift/gammastep: use ini file
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.
2021-02-07 23:33:17 +01:00

25 lines
745 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
commonOptions = import ./lib/options.nix {
inherit config lib pkgs;
moduleName = "gammastep";
programName = "Gammastep";
# https://gitlab.com/chinstrap/gammastep/-/commit/1608ed61154cc652b087e85c4ce6125643e76e2f
mainSection = "general";
defaultPackage = pkgs.gammastep;
examplePackage = "pkgs.gammastep";
mainExecutable = "gammastep";
appletExecutable = "gammastep-indicator";
xdgConfigFilePath = "gammastep/config.ini";
serviceDocumentation = "https://gitlab.com/chinstrap/gammastep/";
};
in {
meta = commonOptions.meta;
options.services.gammastep = commonOptions.options;
config = mkIf config.services.gammastep.enable commonOptions.config;
}