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
This commit is contained in:
Motiejus Jakštys 2024-04-08 17:51:06 +03:00
parent d849318a49
commit dd1e21f39f
1 changed files with 8 additions and 1 deletions

View File

@ -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;