aboutsummaryrefslogtreecommitdiff
path: root/modules/root.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/root.nix')
-rw-r--r--modules/root.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/root.nix b/modules/root.nix
new file mode 100644
index 0000000..d74fe66
--- /dev/null
+++ b/modules/root.nix
@@ -0,0 +1,21 @@
+{ config, pkgs, lib, ... }:
+with builtins // lib;
+let
+ importOption = p: (import p { inherit pkgs lib; } "").option;
+in {
+ options = {
+ file = importOption ./lib/file.nix;
+ manifest = importOption ./lib/manifest.nix;
+
+ src = mkOption {
+ type = types.package;
+ description = "The base source files to use";
+ default = with pkgs.kobo.src;
+ if config.plato.enable && config.koreader.enable then KOReader-Plato
+ else if config.plato.enable then Plato
+ else if config.koreader.enable then KOReader
+ else if config.kfmon.enable then KFMon
+ else pkgs.runCommandLocal "empty-kobo" {} "mkdir -p $out";
+ };
+ };
+}