mirror of
https://github.com/nix-community/home-manager
synced 2024-12-29 13:19:47 +01:00
6b15b03898
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).
22 lines
540 B
Nix
22 lines
540 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
commonOptions = import ./lib/options.nix {
|
|
inherit config lib;
|
|
|
|
moduleName = "redshift";
|
|
programName = "Redshift";
|
|
defaultPackage = pkgs.redshift;
|
|
examplePackage = "pkgs.redshift";
|
|
mainExecutable = "redshift";
|
|
appletExecutable = "redshift-gtk";
|
|
serviceDocumentation = "http://jonls.dk/redshift/";
|
|
};
|
|
|
|
in {
|
|
meta = commonOptions.meta;
|
|
options.services.redshift = commonOptions.options;
|
|
config = mkIf config.services.redshift.enable commonOptions.config;
|
|
}
|