diff options
author | Alan Pearce | 2024-05-11 22:48:39 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-12 21:34:57 +0200 |
commit | fb25a97b6c55c6d51e59d983fdb74b4917c97bf0 (patch) | |
tree | 1e42c0efbbd75fa64f2ed4687bec8f2e49a2f424 /nix/modules/source-options.nix | |
parent | 42bcd10f010f884bddb0142c31b526faace24186 (diff) | |
download | searchix-fb25a97b6c55c6d51e59d983fdb74b4917c97bf0.tar.lz searchix-fb25a97b6c55c6d51e59d983fdb74b4917c97bf0.tar.zst searchix-fb25a97b6c55c6d51e59d983fdb74b4917c97bf0.zip |
feat: nix module
Diffstat (limited to 'nix/modules/source-options.nix')
-rw-r--r-- | nix/modules/source-options.nix | 16 |
1 files changed, 16 insertions, 0 deletions
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."; + }; +} |