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.";
};
}
|