nixos/modules/hardware/monitors.nix

50 lines
1.2 KiB
Nix
Raw Normal View History

2025-01-31 15:13:22 +01:00
# https://github.com/ChangeCaps/nixos-config/tree/0cec356abc0e46ca6ba27b3cf01cd51273bd4a69
2025-02-18 20:17:57 +01:00
{lib, ...}: {
options.monitors = lib.mkOption {
type = lib.types.listOf (lib.types.submodule {
2025-01-31 15:13:22 +01:00
options = {
name = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
example = "DP-1";
};
resolution = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
example = "1920x1080";
};
refreshRate = lib.mkOption {
type = lib.types.nullOr lib.types.int;
default = null;
example = 60;
};
position = lib.mkOption {
2025-02-18 20:17:57 +01:00
type = lib.types.str;
default = "0x0";
2025-01-31 15:13:22 +01:00
};
scale = lib.mkOption {
type = lib.types.float;
default = 1.0;
};
2025-02-21 14:27:55 +01:00
transform = lib.mkOption {
# https://wiki.hyprland.org/Configuring/Monitors/#rotating
type = lib.types.nullOr lib.types.int;
default = null;
2025-02-21 15:25:56 +01:00
example = 1;
2025-02-21 14:27:55 +01:00
};
2025-01-31 15:13:22 +01:00
enable = lib.mkOption {
type = lib.types.bool;
default = true;
};
};
2025-02-18 20:17:57 +01:00
});
2025-02-19 23:42:24 +01:00
default = [];
2025-01-31 15:13:22 +01:00
};
}