fix: add refreshRateNiri

This commit is contained in:
Nickolaj Jepsen 2025-09-30 07:41:10 +02:00
parent a33c6008d1
commit ad9440eb6a
3 changed files with 13 additions and 6 deletions

View file

@ -296,15 +296,13 @@ in {
};
outputs = lib.mkIf (config.monitors != []) (
lib.listToAttrs (map (monitor: let
refreshRateFloat = lib.mkIf (monitor.refreshRate != null) (builtins.fromJSON "${builtins.toString monitor.refreshRate}.0");
in {
lib.listToAttrs (map (monitor: {
inherit (monitor) name;
value = {
inherit (monitor) position;
mode = {
inherit (monitor.resolution) width height;
refresh = refreshRateFloat;
refresh = monitor.refreshRateNiri or null;
};
focus-at-startup = monitor.name == primaryMonitorName;
transform.rotation =

View file

@ -28,6 +28,12 @@
example = 60;
};
refreshRateNiri = lib.mkOption {
type = lib.types.nullOr lib.types.float;
default = null;
example = 60.0;
};
position.x = lib.mkOption {
type = lib.types.int;
default = 0;