nix-files/nixpatches/01-phosh-float-scale.patch

20 lines
703 B
Diff

diff --git a/nixos/modules/services/x11/desktop-managers/phosh.nix b/nixos/modules/services/x11/desktop-managers/phosh.nix
index 4bf78fa16e7..13f7b3fbef2 100644
--- a/nixos/modules/services/x11/desktop-managers/phosh.nix
+++ b/nixos/modules/services/x11/desktop-managers/phosh.nix
@@ -78,7 +78,13 @@ let
description = ''
Display scaling factor.
'';
- type = types.nullOr types.ints.unsigned;
+ type = types.nullOr (
+ types.addCheck
+ (types.either types.int types.float)
+ (x : x > 0)
+ ) // {
+ description = "null or positive integer or float";
+ };
default = null;
example = 2;
};