Signed-off-by: Bloxx12 <charlie@charlieroot.dev> Change-Id: I6a6a69641c36f9763e104087a559c148d0449f00
71 lines
1.6 KiB
Nix
71 lines
1.6 KiB
Nix
{ lib, ... }:
|
|
let
|
|
inherit (lib.options) mkOption;
|
|
inherit (lib.types)
|
|
submodule
|
|
int
|
|
ints
|
|
number
|
|
attrsOf
|
|
;
|
|
in
|
|
{
|
|
options.modules.system.hardware.monitors = mkOption {
|
|
description = "\n List of monitors to use\n ";
|
|
default = { };
|
|
type = attrsOf (submodule {
|
|
options = {
|
|
resolution = mkOption {
|
|
type = submodule {
|
|
options = {
|
|
x = mkOption {
|
|
type = int;
|
|
description = "monitor width";
|
|
default = "1920";
|
|
};
|
|
y = mkOption {
|
|
type = int;
|
|
description = "monitor height";
|
|
default = "1080";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
scale = mkOption {
|
|
type = number;
|
|
description = "monitor scale";
|
|
default = 1.0;
|
|
};
|
|
refreshRate = mkOption {
|
|
type = int;
|
|
description = "monitor refresh rate (in Hz)";
|
|
default = 60;
|
|
};
|
|
position = mkOption {
|
|
type = submodule {
|
|
options = {
|
|
x = mkOption {
|
|
type = int;
|
|
default = 0;
|
|
};
|
|
y = mkOption {
|
|
type = int;
|
|
default = 0;
|
|
};
|
|
};
|
|
};
|
|
description = "absolute monitor posititon";
|
|
default = {
|
|
x = 0;
|
|
y = 0;
|
|
};
|
|
};
|
|
transform = mkOption {
|
|
type = ints.between 0 3;
|
|
description = "Rotation of the monitor counterclockwise";
|
|
default = 0;
|
|
};
|
|
};
|
|
});
|
|
};
|
|
}
|