diff options
| author | Chris Wells <chris@mathematicaster.org> | 2024-09-10 11:52:55 -0500 |
|---|---|---|
| committer | Chris Wells <chris@mathematicaster.org> | 2024-09-10 11:53:30 -0500 |
| commit | 5cb16c34a8c5b803ec723934c1dc828c0e8e3bad (patch) | |
| tree | 082671e90b6da26a0c06c1a5abc7a4571e0dcc84 /modules/koboroot/default.nix | |
| parent | 8eae39e8e670f228e9675fb3bc432ce512560396 (diff) | |
| download | kobo-manager-5cb16c34a8c5b803ec723934c1dc828c0e8e3bad.tar kobo-manager-5cb16c34a8c5b803ec723934c1dc828c0e8e3bad.tar.gz kobo-manager-5cb16c34a8c5b803ec723934c1dc828c0e8e3bad.tar.bz2 kobo-manager-5cb16c34a8c5b803ec723934c1dc828c0e8e3bad.tar.lz kobo-manager-5cb16c34a8c5b803ec723934c1dc828c0e8e3bad.tar.xz kobo-manager-5cb16c34a8c5b803ec723934c1dc828c0e8e3bad.tar.zst kobo-manager-5cb16c34a8c5b803ec723934c1dc828c0e8e3bad.zip | |
Trying to get everything to actually work
Diffstat (limited to 'modules/koboroot/default.nix')
| -rw-r--r-- | modules/koboroot/default.nix | 34 |
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)); + }; + }; +} |
