blob: 308ac6bfaea3a76e4e686d96e6953035631e23c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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));
};
};
}
|