aboutsummaryrefslogtreecommitdiff
path: root/stage1/lib/root.h
blob: 3fbca0c536794dbc475ada4fe2cde73bdddf1abe (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
31
32
33
34
35
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,
    };
}