mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
phosh: restrict the scale
config value to strictly positive values or null
This commit is contained in:
parent
cabf369f83
commit
1d0649f929
@ -78,7 +78,13 @@ let
|
||||
description = ''
|
||||
Display scaling factor.
|
||||
'';
|
||||
type = types.nullOr (types.either types.ints.unsigned types.float);
|
||||
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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user