2024-08-28 11:04:53 +02:00
|
|
|
{lib, ...}: let
|
|
|
|
inherit (lib) mkOption;
|
2024-08-28 11:48:41 +02:00
|
|
|
inherit (lib.types) str submodule int ints number attrsOf listOf;
|
2024-08-28 11:04:53 +02:00
|
|
|
in {
|
2024-08-28 11:48:41 +02:00
|
|
|
options.modules.system.hardware.monitors = mkOption {
|
2024-05-15 00:14:59 +02:00
|
|
|
description = "\n List of monitors to use\n ";
|
2024-08-28 11:48:41 +02:00
|
|
|
default = {};
|
|
|
|
type = attrsOf (submodule {
|
2024-08-28 11:04:53 +02:00
|
|
|
options = {
|
|
|
|
resolution = mkOption {
|
|
|
|
type = submodule {
|
|
|
|
options = {
|
|
|
|
x = mkOption {
|
|
|
|
type = int;
|
|
|
|
description = "monitor width";
|
|
|
|
default = "1920";
|
|
|
|
};
|
|
|
|
y = mkOption {
|
|
|
|
type = int;
|
|
|
|
description = "monitor height";
|
|
|
|
default = "1080";
|
2024-04-13 13:47:36 +02:00
|
|
|
};
|
|
|
|
};
|
2024-04-12 22:03:29 +02:00
|
|
|
};
|
2024-08-28 11:04:53 +02:00
|
|
|
};
|
|
|
|
scale = mkOption {
|
|
|
|
type = number;
|
|
|
|
description = "monitor scale";
|
|
|
|
default = 1.0;
|
|
|
|
};
|
2024-08-28 11:48:41 +02:00
|
|
|
refreshRate = mkOption {
|
2024-08-28 11:04:53 +02:00
|
|
|
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;
|
2024-04-13 13:47:36 +02:00
|
|
|
};
|
2024-05-15 00:14:59 +02:00
|
|
|
};
|
2024-04-12 22:03:29 +02:00
|
|
|
};
|
2024-08-28 11:04:53 +02:00
|
|
|
description = "absolute monitor posititon";
|
|
|
|
default = {
|
|
|
|
x = 0;
|
|
|
|
y = 0;
|
2024-04-12 22:03:29 +02:00
|
|
|
};
|
|
|
|
};
|
2024-08-28 11:04:53 +02:00
|
|
|
transform = mkOption {
|
|
|
|
type = ints.between 0 3;
|
|
|
|
description = "Rotation of the monitor counterclockwise";
|
|
|
|
default = 0;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
2024-04-12 22:03:29 +02:00
|
|
|
};
|
|
|
|
}
|