diff options
| author | tv <tv@krebsco.de> | 2017-08-01 11:27:03 +0200 | 
|---|---|---|
| committer | tv <tv@krebsco.de> | 2017-08-01 12:02:02 +0200 | 
| commit | 0c2decf99cbc33557f602efad65b2402ba484636 (patch) | |
| tree | 5f90b303a6a363ae0df0e0147078ad74e88cdfb1 /lib | |
| parent | 8f5e3bae42afb5c312a8ecaeaf8fd4b1f41d3ed2 (diff) | |
krebs.sitemap: init
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/types.nix | 16 | 
1 files changed, 15 insertions, 1 deletions
| diff --git a/lib/types.nix b/lib/types.nix index 236190c..8c68468 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 = { | 
