mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
nixos/config/timezone: Disallow spaces
This commit is contained in:
parent
3fe7cddc30
commit
7b81889394
@ -5,6 +5,9 @@ with lib;
|
||||
let
|
||||
|
||||
tzdir = "${pkgs.tzdata}/share/zoneinfo";
|
||||
nospace = str: filter (c: c == " ") (stringToCharacters str) == [];
|
||||
timezone = types.nullOr (types.addCheck types.str nospace)
|
||||
// { description = "null or string without spaces"; };
|
||||
|
||||
in
|
||||
|
||||
@ -15,7 +18,7 @@ in
|
||||
|
||||
timeZone = mkOption {
|
||||
default = null;
|
||||
type = types.nullOr types.str;
|
||||
type = timezone;
|
||||
example = "America/New_York";
|
||||
description = ''
|
||||
The time zone used when displaying times and dates. See <link
|
||||
|
Loading…
Reference in New Issue
Block a user