summaryrefslogtreecommitdiff
path: root/openwrt/etc.nix
diff options
context:
space:
mode:
authorpennae <pennae.git@eno.space>2023-10-01 18:41:26 +0200
committerpennae <pennae.git@eno.space>2023-10-01 18:41:26 +0200
commit04b7ba3a33bded61429bf18f0513983c5ab08eb3 (patch)
tree901217fc3f454d4a79053074536d192728519fd2 /openwrt/etc.nix
parent61e20312ff66ab8d9af6ed2963ffc3acca50b14e (diff)
downloaddewclaw-04b7ba3a33bded61429bf18f0513983c5ab08eb3.tar.gz
dewclaw-04b7ba3a33bded61429bf18f0513983c5ab08eb3.tar.xz
dewclaw-04b7ba3a33bded61429bf18f0513983c5ab08eb3.zip
add *some* documentation
Diffstat (limited to 'openwrt/etc.nix')
-rw-r--r--openwrt/etc.nix38
1 files changed, 25 insertions, 13 deletions
diff --git a/openwrt/etc.nix b/openwrt/etc.nix
index 8231125..b9f8324 100644
--- a/openwrt/etc.nix
+++ b/openwrt/etc.nix
@@ -6,21 +6,33 @@ in
{
options.etc = lib.mkOption {
- type = lib.types.attrsOf (lib.types.submodule ({ name, ... }: {
- options = {
- enable = lib.mkEnableOption "this `/etc` file" // {
- default = true;
- };
+ type = lib.types.attrsOf (lib.types.submoduleWith {
+ description = "`/etc` file description";
+ modules = [
+ ({ name, ... }: {
+ options = {
+ enable = lib.mkEnableOption "this `/etc` file" // {
+ default = true;
+ };
- text = lib.mkOption {
- type = lib.types.lines;
- description = ''
- Contents of the file.
- '';
- };
- };
- }));
+ text = lib.mkOption {
+ type = lib.types.lines;
+ description = ''
+ Contents of the file.
+ '';
+ };
+ };
+ })
+ ];
+ });
default = {};
+ description = ''
+ Extra files to *create* in the target `/etc`. It is not currently possible to
+ *delete* files from the target.
+
+ This option should usually not be used if there's a UCI way to achieve the
+ same effect.
+ '';
};
config = lib.mkIf (cfg != {}) {