From dd1e21f39f07a43de49e90866869c23bad4cb31e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 8 Apr 2024 17:51:06 +0300 Subject: [PATCH] nixos/autorandr: add --match-edid It is useful when outputs change, but EDIDs do not. See [upstream PR][1] for more details. [1]: https://github.com/phillipberndt/autorandr/pull/293 --- nixos/modules/services/misc/autorandr.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/autorandr.nix b/nixos/modules/services/misc/autorandr.nix index aa96acb61306..22d1fb727477 100644 --- a/nixos/modules/services/misc/autorandr.nix +++ b/nixos/modules/services/misc/autorandr.nix @@ -260,6 +260,12 @@ in { description = lib.mdDoc "Treat outputs as connected even if their lids are closed"; }; + matchEdid = mkOption { + default = false; + type = types.bool; + description = lib.mdDoc "Match displays based on edid instead of name"; + }; + hooks = mkOption { type = hooksModule; description = lib.mdDoc "Global hook scripts"; @@ -351,7 +357,8 @@ in { --batch \ --change \ --default ${cfg.defaultTarget} \ - ${optionalString cfg.ignoreLid "--ignore-lid"} + ${optionalString cfg.ignoreLid "--ignore-lid"} \ + ${optionalString cfg.matchEdid "--match-edid"} ''; Type = "oneshot"; RemainAfterExit = false;