services.autorandr: add package option

This commit is contained in:
Maya the bee
2025-05-10 22:52:36 +02:00
committed by Austin Horstman
parent 4f44221724
commit 555f88ad34

View File

@@ -23,6 +23,8 @@ in
'';
};
package = lib.mkPackageOption pkgs "autorandr" { };
ignoreLid = lib.mkOption {
default = false;
type = lib.types.bool;
@@ -45,7 +47,7 @@ in
Service = {
Type = "oneshot";
ExecStart = "${pkgs.autorandr}/bin/autorandr --change ${lib.optionalString cfg.ignoreLid "--ignore-lid"}";
ExecStart = "${cfg.package}/bin/autorandr --change ${lib.optionalString cfg.ignoreLid "--ignore-lid"}";
};
Install.WantedBy = [ "graphical-session.target" ];