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 19 20 21 22 23 24 25 26 | { settingsFormat, ... }: { lib, name, ... }: let inherit (lib) 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."; }; } |