diff options
Diffstat (limited to 'modules/default.nix')
| -rw-r--r-- | modules/default.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..d32d8f6 --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,27 @@ +{ lib, flake-parts-lib, ... }: +let + inherit (lib) mkOption mkEnableOption types; + inherit (flake-parts-lib) mkPerSystemOption; +in { + options.perSystem = mkPerSystemOption ({ pkgs, system, config, ... }: { + options.koreader = mkOption { + default = {}; + type = types.lazyAttrsOf <| types.submoduleWith { + shorthandOnlyDefinesConfig = true; + modules = [ + { + _module.args = { + inherit pkgs lib; + }; + } + ({ name, ... }: { + imports = [ ./main.nix ]; + options = { + enable = mkEnableOption name // { default = true; }; + }; + }) + ]; + }; + }; + }); +} |
