some refactoring

This commit is contained in:
2025-07-18 17:17:35 +02:00
parent 05e7a7d1ca
commit 15793a2c42
19 changed files with 172 additions and 199 deletions

View File

@@ -14,10 +14,6 @@ in {
type = types.str;
example = "DP-1";
};
primary = mkOption {
type = types.bool;
default = false;
};
width = mkOption {
type = types.int;
example = 1920;
@@ -60,14 +56,4 @@ in {
);
default = [];
};
config = {
assertions = [
{
assertion =
((lib.length config.monitors) != 0)
-> ((lib.length (lib.filter (m: m.primary) config.monitors)) == 1);
message = "Exactly one monitor must be set to primary.";
}
];
};
}