From 5cb16c34a8c5b803ec723934c1dc828c0e8e3bad Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Tue, 10 Sep 2024 11:52:55 -0500 Subject: Trying to get everything to actually work --- modules/koboroot/default.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 modules/koboroot/default.nix (limited to 'modules/koboroot/default.nix') 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)); + }; + }; +} -- cgit v1.2.3