aboutsummaryrefslogtreecommitdiff
path: root/modules/koboroot
diff options
context:
space:
mode:
Diffstat (limited to 'modules/koboroot')
-rw-r--r--modules/koboroot/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/koboroot/default.nix b/modules/koboroot/default.nix
new file mode 100644
index 0000000..308ac6b
--- /dev/null
+++ b/modules/koboroot/default.nix
@@ -0,0 +1,34 @@
+{ config, pkgs, lib, ... }:
+with builtins // lib;
+let
+ cfg = config.koboroot;
+in {
+ options.koboroot = {
+ file = mkOption {
+ default = {};
+ type = types.attrsOf (types.submodule (pkgs.callPackage ../lib/file-type.nix {}));
+ apply = filterAttrs (_: v: v.enable);
+ };
+
+ include = mkOption {
+ default = [];
+ type = with types; listOf path;
+ };
+
+ _allFiles = mkOption {
+ type = types.package;
+ readOnly = true;
+ internal = true;
+ default = pkgs.buildEnv {
+ name = "koboroot-files";
+ paths = cfg.include;
+ };
+ };
+ };
+
+ config = {
+ koboroot = {
+ include = mkBefore (mapAttrsToList (_: v: v._package));
+ };
+ };
+}