Setup monitors

This commit is contained in:
muon 2024-06-14 15:54:47 +00:00
parent b5e7be0747
commit 2aa3d272c9
4 changed files with 63 additions and 35 deletions

View file

@ -1,11 +1,23 @@
{ pkgs, lib, config, ... }: {
{ pkgs, lib, config, ... }: let
monitorModule = lib.types.submodule {
options = {
name = lib.mkOption {
type = lib.types.string;
description = "monitor name";
example = "HDMI-1";
};
config = lib.mkOption {
type = lib.types.attrs;
description = "autorandr profile config";
};
};
};
in {
options.mods = {
xorg.enable = lib.mkEnableOption "enables xorg";
monitor.main.resolution = lib.mkOption {
description = "main monitor resolution";
type = lib.types.string;
default = "1920x1080";
example = "2560x1440";
monitors = lib.mkOption {
type = lib.types.attrsOf monitorModule;
default = { };
};
};