all repos — searchix @ 6ea953b1c9f9c352a9619e42a6f0ce80d183d7f8

Search engine for NixOS, nix-darwin, home-manager and NUR users

nix/modules/source-options.nix (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ cfg, settingsFormat }:
{ config, lib, name, ... }:
let
  inherit (lib) literalExpression mkOption mkEnableOption types;
in
{
  freeformType = settingsFormat.type;

  options = {
    key = mkOption {
      type = types.strMatching "[a-z0-9_-]*";
      default = name;
      description = "URL-safe name for this source.";
    };

    enable = mkEnableOption "Whether to enable this source.";
  };
}