mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
services.autorandr: add package option
This commit is contained in:
committed by
Austin Horstman
parent
4f44221724
commit
555f88ad34
@@ -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" ];
|
||||
|
||||
Reference in New Issue
Block a user