diff --git a/hosts/desktop/monitors.nix b/hosts/desktop/monitors.nix index 739df91..384f647 100644 --- a/hosts/desktop/monitors.nix +++ b/hosts/desktop/monitors.nix @@ -6,7 +6,8 @@ _: { width = 2560; height = 1440; }; - refreshRate = 144; + refreshRate = 170; + refreshRateNiri = 170.001; position = { x = 1920; y = 0; @@ -18,7 +19,8 @@ _: { width = 2560; height = 1440; }; - refreshRate = 144; + refreshRate = 165; + refreshRateNiri = 165.000; position = { x = 4480; y = 0; @@ -31,6 +33,7 @@ _: { height = 1080; }; refreshRate = 60; + refreshRateNiri = 60.000; position = { x = 0; y = 0; diff --git a/legacy_modules/desktop/niri.nix b/legacy_modules/desktop/niri.nix index 42447d3..be1858c 100644 --- a/legacy_modules/desktop/niri.nix +++ b/legacy_modules/desktop/niri.nix @@ -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 = diff --git a/legacy_modules/hardware/monitors.nix b/legacy_modules/hardware/monitors.nix index 7c1c8ca..5a35637 100644 --- a/legacy_modules/hardware/monitors.nix +++ b/legacy_modules/hardware/monitors.nix @@ -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;