diff options
author | Gaetan Lepage <gaetan@glepage.com> | 2023-01-15 16:57:13 +0100 |
---|---|---|
committer | Gaetan Lepage <gaetan@glepage.com> | 2023-01-15 16:57:13 +0100 |
commit | d599e734e5de8f2cfbd143a218c50b48b3db40c4 (patch) | |
tree | ef038ae3b328f85466bbc83a33bdac5cc8a4564f /nixos | |
parent | 162545d3fdf3c7c02ca8eb0d8dc3d6aec7cae2ea (diff) |
autorandr: 1.12.1 -> 1.13, nixos/services/autorandr: add ignoreLeadOption
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/autorandr.nix | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/autorandr.nix b/nixos/modules/services/misc/autorandr.nix index 072064143dbdb..aa96acb613067 100644 --- a/nixos/modules/services/misc/autorandr.nix +++ b/nixos/modules/services/misc/autorandr.nix @@ -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"; |