summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-08-01 13:46:49 +0200
committerlassulus <lassulus@lassul.us>2017-08-01 13:46:49 +0200
commitef128bdd0fea2442bbf9775fccd3eb4ca71bfdcc (patch)
tree0f7aea47e8e73d24bb03de4f4c7e831b38c86f00 /lib
parentb95e15654d66607a416b2ba0e87a5d9dd0fe09ed (diff)
parente19b506f36c8848ece02d7796a91ff0634191609 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'lib')
-rw-r--r--lib/types.nix16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/types.nix b/lib/types.nix
index 236190ccd..8c6846887 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -5,7 +5,7 @@ let
all any concatMapStringsSep concatStringsSep const filter flip
genid hasSuffix head isInt isString length mergeOneOption mkOption
mkOptionType optional optionalAttrs optionals range splitString
- stringLength substring test typeOf;
+ stringLength substring test testString typeOf;
inherit (lib.types)
attrsOf bool either enum int listOf nullOr path str string submodule;
in
@@ -357,6 +357,20 @@ rec {
pgp-pubkey = str;
+ sitemap.entry = submodule ({ config, ... }: {
+ options = {
+ desc = mkOption {
+ default = null;
+ type = nullOr str;
+ };
+ href = mkOption {
+ ${if testString "https?://.*" config._module.args.name
+ then "default" else null} = config._module.args.name;
+ type = nullOr str; # TODO nullOr uri?
+ };
+ };
+ });
+
ssh-pubkey = str;
ssh-privkey = submodule {
options = {