about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorMotiejus Jakštys <motiejus@jakstys.lt>2024-04-08 17:51:06 +0300
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2024-04-09 20:46:09 +0000
commit0e4cd209a155b3d1d84928275cb24436f43f1e3f (patch)
tree7d1d6c832a2062163caf21501c489be30691c73b /nixos/modules
parentc711e080300a8b2a6ad6d402ecc50dcda0165819 (diff)
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

(cherry picked from commit dd1e21f39f07a43de49e90866869c23bad4cb31e)
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/misc/autorandr.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/autorandr.nix b/nixos/modules/services/misc/autorandr.nix
index aa96acb613067..22d1fb727477c 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;