From fb25a97b6c55c6d51e59d983fdb74b4917c97bf0 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 11 May 2024 22:48:39 +0200 Subject: feat: nix module --- nix/modules/source-options.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 nix/modules/source-options.nix (limited to 'nix/modules/source-options.nix') diff --git a/nix/modules/source-options.nix b/nix/modules/source-options.nix new file mode 100644 index 0000000..4757c89 --- /dev/null +++ b/nix/modules/source-options.nix @@ -0,0 +1,16 @@ +{ cfg }: +{ config, lib, name, ... }: +let + inherit (lib) literalExpression mkOption mkEnableOption types; +in +{ + 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."; + }; +} -- cgit 1.4.1