aboutsummaryrefslogtreecommitdiff
path: root/modules/root.nix
blob: d74fe66ac94d96656c766c412093a27a90be0ecc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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";
    };
  };
}