0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

autorandr: 1.12.1 -> 1.13, nixos/services/autorandr: add ignoreLeadOption

This commit is contained in:
Gaetan Lepage 2023-01-15 16:57:13 +01:00
parent 162545d3fd
commit d599e734e5
2 changed files with 15 additions and 3 deletions

View file

@ -254,6 +254,12 @@ in {
'';
};
ignoreLid = mkOption {
default = false;
type = types.bool;
description = lib.mdDoc "Treat outputs as connected even if their lids are closed";
};
hooks = mkOption {
type = hooksModule;
description = lib.mdDoc "Global hook scripts";
@ -340,7 +346,13 @@ in {
startLimitIntervalSec = 5;
startLimitBurst = 1;
serviceConfig = {
ExecStart = "${pkgs.autorandr}/bin/autorandr --batch --change --default ${cfg.defaultTarget}";
ExecStart = ''
${pkgs.autorandr}/bin/autorandr \
--batch \
--change \
--default ${cfg.defaultTarget} \
${optionalString cfg.ignoreLid "--ignore-lid"}
'';
Type = "oneshot";
RemainAfterExit = false;
KillMode = "process";