From 77d33f77d7cffa9e53c780398ae0fadc8dd0eda5 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 26 Jul 2015 23:32:43 +0200 Subject: [PATCH] nixos: redshift service: add extraOptions --- nixos/modules/services/x11/redshift.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/x11/redshift.nix b/nixos/modules/services/x11/redshift.nix index 99d19f6ab151..f164b47fc869 100644 --- a/nixos/modules/services/x11/redshift.nix +++ b/nixos/modules/services/x11/redshift.nix @@ -47,6 +47,13 @@ in { type = types.str; }; }; + + services.redshift.extraOptions = mkOption { + type = types.listOf types.str; + default = []; + example = [ "-v" "-m randr" ]; + description = "Additional command-line arguments to pass to the redshift(1) command"; + }; }; config = mkIf cfg.enable { @@ -59,7 +66,8 @@ in { ${pkgs.redshift}/bin/redshift \ -l ${cfg.latitude}:${cfg.longitude} \ -t ${toString cfg.temperature.day}:${toString cfg.temperature.night} \ - -b ${toString cfg.brightness.day}:${toString cfg.brightness.night} + -b ${toString cfg.brightness.day}:${toString cfg.brightness.night} \ + ${cfg.extraOptions} ''; environment = { DISPLAY = ":0"; }; serviceConfig.Restart = "always";