aboutsummaryrefslogtreecommitdiff
path: root/modules/kfmon.nix
diff options
context:
space:
mode:
authorChris Wells <chris@mathematicaster.org>2024-02-14 15:13:20 -0600
committerChris Wells <chris@mathematicaster.org>2024-02-14 15:13:20 -0600
commitcbde891d1ced129f6284cbadade652182aa5d2fb (patch)
tree8c09770b3e4082dd3d205695e3d1827daba14ffc /modules/kfmon.nix
parent51ae706e6c007cdda2ebb8317c1d438dff9ed570 (diff)
downloadkobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.tar
kobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.tar.gz
kobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.tar.bz2
kobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.tar.lz
kobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.tar.xz
kobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.tar.zst
kobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.zip
Fixing my earlier mistakes
Diffstat (limited to 'modules/kfmon.nix')
-rw-r--r--modules/kfmon.nix21
1 files changed, 8 insertions, 13 deletions
diff --git a/modules/kfmon.nix b/modules/kfmon.nix
index 772a10b..33f6a9c 100644
--- a/modules/kfmon.nix
+++ b/modules/kfmon.nix
@@ -2,6 +2,7 @@
with builtins // lib;
let
cfg = config.kfmon;
+ importOption = p: (import p { inherit pkgs lib; } cfg.path).option;
in {
options.kfmon = {
enable = mkEnableOption "KFMon";
@@ -12,19 +13,13 @@ in {
description = "Relative path to kfmon within src";
};
- file = mkOption {
- type = options.file.type;
- default = {};
- description = "Files relative to ${cfg.path}";
- };
+ file = importOption ./lib/file.nix;
+ manifest = importOption ./lib/manifest.nix;
+ # 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
- };
}