blob: 772a10b3b76a94bfc39921a437fe85d511ddaa70 (
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
|
{ config, pkgs, lib, options, ... }:
with builtins // lib;
let
cfg = config.kfmon;
in {
options.kfmon = {
enable = mkEnableOption "KFMon";
path = mkOption {
type = types.str;
default = ".adds/kfmon";
description = "Relative path to kfmon within src";
};
file = mkOption {
type = options.file.type;
default = {};
description = "Files relative to ${cfg.path}";
};
};
config = mkIf cfg.enable {
file = mapAttrs' (n: v: {
name = "kfmon-${n}";
value = v // {
target = "${cfg.path}/${v.target}";
};
}) cfg.file
};
}
|