diff options
Diffstat (limited to 'stage1/lib/root.h')
-rw-r--r-- | stage1/lib/root.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/stage1/lib/root.h b/stage1/lib/root.h new file mode 100644 index 00000000000..3fbca0c5367 --- /dev/null +++ b/stage1/lib/root.h @@ -0,0 +1,36 @@ +#include <string> +#include <fstream> +#include <iostream> +#include <filesystem> + +using std::string; +namespace fs = std::filesystem; + +/** Root build type */ +enum r_type { + FULL_NIXOS, + FULL_DARWIN, + PARTIAL, + COLLECTION, +}; + +/** Root metadata */ +struct root_t { + string name; + string path; + enum r_type type; +}; + + +root_t get_root(string path) +{ + for(auto &entry: fs::recursive_directory_iterator(path)) { + std::cout << entry.path() << std::endl; + } + + return root_t { + "hyperion", + "roots/hyperion/default.nix", + FULL_NIXOS, + }; +} |