FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
config.hpp
Go to the documentation of this file.
1
8
9#pragma once
10
11#include <cctype>
12#include <cstdint>
13#include <memory>
14#include <string>
15#include <sys/stat.h>
16#include <sys/types.h>
17#include <unistd.h>
18#include <pwd.h>
19#include <filesystem>
20#include <format>
21#include <unordered_map>
22
23#include "bwrap/bwrap.hpp"
26#include "db/portal/daemon.hpp"
28#include "lib/env.hpp"
29#include "db/env.hpp"
30#include "lib/log.hpp"
31#include "macro.hpp"
32#include "std/expected.hpp"
33#include "std/enum.hpp"
34#include "reserved/casefold.hpp"
35#include "reserved/notify.hpp"
36#include "reserved/overlay.hpp"
37#include "std/filesystem.hpp"
38
39// Version
40#ifndef FIM_VERSION
41#error "FIM_VERSION is undefined"
42#endif
43
44// Git commit hash
45#ifndef FIM_COMMIT
46#error "FIM_COMMIT is undefined"
47#endif
48
49// Distribution
50#ifndef FIM_DIST
51#error "FIM_DIST is undefined"
52#endif
53
54// Compilation timestamp
55#ifndef FIM_TIMESTAMP
56#error "FIM_TIMESTAMP is undefined"
57#endif
58
59// Json file with binary tools
60#ifndef FIM_FILE_TOOLS
61#error "FIM_FILE_TOOLS is undefined"
62#endif
63
64// Dependencies metadata
65#ifndef FIM_FILE_META
66#error "FIM_FILE_META is undefined"
67#endif
68
69// Size for the configuration reserved space in the flatimage
70#ifndef FIM_RESERVED_SIZE
71 #error "FIM_RESERVED_SIZE is undefined"
72#endif
73
74extern "C" uint32_t FIM_RESERVED_OFFSET;
75
76using DaemonMode = ns_db::ns_portal::ns_daemon::Mode;
77
87namespace ns_config
88{
89
90// Distribution enum
91ENUM(Distribution, ARCH, ALPINE, BLUEPRINT)
92
93namespace
94{
95
96namespace fs = std::filesystem;
97
98} // namespace
99
142class Path
143{
147 public:
148 struct Dir
149 {
150 fs::path const self;
151 fs::path const global;
152 fs::path const app;
153 fs::path const app_bin;
154 fs::path const app_sbin;
155 fs::path const instance;
156 fs::path const portal;
157 fs::path const runtime;
158 fs::path const runtime_host;
159 fs::path const host_home;
160 fs::path const host_data;
161 fs::path const host_data_tmp;
162 fs::path const host_data_layers;
163
164 static Value<Dir> create()
165 {
166 // Get path to self
167 fs::path path_bin_self = fs::path{Pop(ns_env::get_expected("FIM_BIN_SELF"))};
168 // Compute all paths first
169 fs::path self = path_bin_self.parent_path();
170 fs::path global = fs::path("/tmp/fim");
171 fs::path app = global / "app" / std::format("{}_{}", FIM_COMMIT, FIM_TIMESTAMP);
172 fs::path app_bin = app / "bin";
173 fs::path app_sbin = app / "sbin";
174 fs::path instance = std::format("{}/{}/{}", app.string(), "instance", std::to_string(getpid()));
175 fs::path portal = instance / "portal";
176 fs::path runtime = fs::path("/tmp/fim/run");
177 fs::path runtime_host = runtime / "host";
178 fs::path host_home = fs::path{ns_env::get_expected("HOME").value()}.relative_path();
179 fs::path host_data = getenv("FIM_DIR_DATA")?:
180 self / std::format(".{}.data", path_bin_self.filename().string());
181 fs::path host_data_tmp = host_data / "tmp";
182 fs::path host_data_layers = host_data / "layers";
183 // Side effect: create directories
186 // Aggregate initialization with const members
187 return Dir
188 {
189 .self = std::move(self),
190 .global = std::move(global),
191 .app = std::move(app),
192 .app_bin = std::move(app_bin),
193 .app_sbin = std::move(app_sbin),
194 .instance = std::move(instance),
195 .portal = std::move(portal),
196 .runtime = std::move(runtime),
197 .runtime_host = std::move(runtime_host),
198 .host_home = std::move(host_home),
199 .host_data = std::move(host_data),
200 .host_data_tmp = std::move(host_data_tmp),
201 .host_data_layers = std::move(host_data_layers)
202 };
203 }
204 } dir;
205
209 struct File
210 {
211 fs::path const bashrc;
212 fs::path const passwd;
213
214 static File create(fs::path const& path_dir_instance)
215 {
216 return File{
217 .bashrc = path_dir_instance / "bashrc",
218 .passwd = path_dir_instance / "passwd"
219 };
220 }
221 } file;
222
226 struct Bin
227 {
228 fs::path const self;
229 fs::path const bash;
230 fs::path const janitor;
231 fs::path const portal_daemon;
232 fs::path const portal_dispatcher;
233
234 static Value<Bin> create(fs::path const& path_dir_app_bin)
235 {
236 return Bin
237 {
238 .self = Pop(ns_env::get_expected("FIM_BIN_SELF")),
239 .bash = path_dir_app_bin / "bash",
240 .janitor = path_dir_app_bin / "fim_janitor",
241 .portal_daemon = path_dir_app_bin / "fim_portal_daemon",
242 .portal_dispatcher = path_dir_app_bin / "fim_portal"
243 };
244 }
245 } bin;
246
258 {
259 auto dir = Pop(Dir::create());
260 auto file = File::create(dir.instance);
261 auto bin = Pop(Bin::create(dir.app_bin));
262 return Path(dir, file, bin);
263 }
264
265 private:
266 Path(Dir const& dir, File const& file, Bin const& bin)
267 : dir(dir)
268 , file(file)
269 , bin(bin)
270 {
271 }
272};
273
307struct Logs
308{
314 fs::path const path_file_boot;
315
316 Logs() = delete;
317 Logs(fs::path const& path_dir_log)
318 : bwrap(path_dir_log / "bwrap")
319 , daemon_host(path_dir_log / "daemon" / "host")
320 , daemon_guest(path_dir_log / "daemon" / "guest")
321 , dispatcher(path_dir_log / "dispatcher")
322 , filesystems(ns_filesystems::ns_controller::Logs
323 {
324 .path_file_dwarfs = path_dir_log / "fuse" / "dwarfs.log",
325 .path_file_ciopfs = path_dir_log / "fuse" / "ciopfs.log",
326 .path_file_overlayfs = path_dir_log / "fuse" / "overlayfs.log",
327 .path_file_unionfs = path_dir_log / "fuse" / "unionfs.log",
328 .path_file_janitor = path_dir_log / "fuse" / "janitor.log",
329 })
330 , path_file_boot(path_dir_log / "boot.log")
331 {
332 fs::create_directories(path_dir_log);
333 fs::create_directories(path_dir_log / "bwrap");
334 fs::create_directories(path_dir_log / "daemon" / "host");
335 fs::create_directories(path_dir_log / "fuse" / "guest");
336 fs::create_directories(path_dir_log / "dispatcher");
337 }
338};
339
345struct Config
346{
353
364
383 bool const is_casefold,
384 fs::path const& path_dir_instance,
385 fs::path const& path_dir_host_data,
386 fs::path const& path_bin_janitor,
387 fs::path const& path_bin_self,
388 fs::path const& path_bin_portal_daemon,
389 fs::path const& path_dir_portal
390 )
391 {
392 // Compute paths first
393 auto path_dir_mount = path_dir_instance / "mount";
394 auto path_dir_work = path_dir_host_data / "work" / std::to_string(getpid());
395 auto path_dir_upper = path_dir_host_data / "root";
396 auto path_dir_layers = path_dir_instance / "layers";
397 auto path_dir_ciopfs = path_dir_host_data / "casefold";
398
399 // Side effects: create directories
400 fs::create_directories(path_dir_mount);
401 fs::create_directories(path_dir_work);
402 fs::create_directories(path_dir_upper);
403 fs::create_directories(path_dir_layers);
404 fs::create_directories(path_dir_ciopfs);
405
406 // Configure overlay type
407 using ns_reserved::ns_overlay::OverlayType;
408 OverlayType overlay_type =
409 ns_env::exists("FIM_OVERLAY", "unionfs")? ns_reserved::ns_overlay::OverlayType::UNIONFS
410 : ns_env::exists("FIM_OVERLAY", "overlayfs")? ns_reserved::ns_overlay::OverlayType::OVERLAYFS
411 : ns_env::exists("FIM_OVERLAY", "bwrap")? ns_reserved::ns_overlay::OverlayType::BWRAP
412 : ns_reserved::ns_overlay::read(path_bin_self)
413 .value_or(OverlayType::BWRAP).get();
414 if(is_casefold and overlay_type == ns_reserved::ns_overlay::OverlayType::BWRAP)
415 {
416 logger("W::casefold cannot be used with bwrap overlayfs, falling back to unionfs");
417 overlay_type = ns_reserved::ns_overlay::OverlayType::UNIONFS;
418 }
419
420 // Compression level configuration (clamps from 0 to 9, default is 7)
421 uint32_t const compression_level = ({
422 std::string str_compression_level = ns_env::get_expected<"D">("FIM_COMPRESSION_LEVEL").value_or("7");
423 uint64_t level = Catch(std::stoull(str_compression_level)).value_or(7);
424 std::clamp(level, uint64_t{0}, uint64_t{9});
425 });
426
427 // Construct configuration objects
429 {
430 .is_casefold = is_casefold,
431 .compression_level = compression_level,
432 .overlay_type = overlay_type,
433 .path_dir_mount = std::move(path_dir_mount),
434 .path_dir_work = std::move(path_dir_work),
435 .path_dir_upper = std::move(path_dir_upper),
436 .path_dir_layers = std::move(path_dir_layers),
437 .path_dir_ciopfs = std::move(path_dir_ciopfs),
438 .path_bin_janitor = path_bin_janitor,
439 .path_bin_self = path_bin_self,
440 .layers = layers,
441 };
442
443 auto daemon = Daemon
444 {
445 .host = ns_db::ns_portal::ns_daemon::Daemon(DaemonMode::HOST
446 , path_bin_portal_daemon
447 , path_dir_portal
448 ),
449 .guest = ns_db::ns_portal::ns_daemon::Daemon(DaemonMode::GUEST
450 , path_bin_portal_daemon
451 , path_dir_portal
452 ),
453 };
454
455 return Config
456 {
457 .fuse = std::move(fuse),
458 .daemon = std::move(daemon)
459 };
460 }
461};
462
475struct Flags
476{
477 private:
478 Flags() = default;
479
480 public:
481 bool is_root;
482 bool is_debug;
485
498 static Value<Flags> create(fs::path const& path_bin_self)
499 {
500 Flags flags;
501 auto environment = ns_db::ns_env::map(Pop(ns_db::ns_env::get(path_bin_self)));
502 flags.is_root = ns_env::exists("FIM_ROOT", "1")
503 or (environment.contains("UID") and environment.at("UID") == "0");
504 flags.is_casefold = ns_env::exists("FIM_CASEFOLD", "1")
505 or Pop(ns_reserved::ns_casefold::read(path_bin_self));
506 flags.is_notify = Pop(ns_reserved::ns_notify::read(path_bin_self));
507 flags.is_debug = ns_env::exists("FIM_DEBUG", "1");
508 return flags;
509 }
510};
511
519{
520 Distribution const distribution;
521 pid_t const pid;
526
527 [[nodiscard]] Value<ns_bwrap::ns_proxy::User> configure_bwrap() const
528 {
529 using namespace ns_bwrap::ns_proxy;
530 // Get environment variables saved in the binary
531 auto variables = ns_db::ns_env::map(Pop(ns_db::ns_env::get(path.bin.self)));
532 // Get user info for defaults
533 struct passwd *pw = getpwuid(getuid());
534 return_if(not pw, Error("E::Failed to get current user info"));
535 // Get user id with this priority
536 // 1. is_root
537 // 1. Binary environment data
538 // 2. pw
539 Id id = flags.is_root? Id{.uid = 0, .gid = 0} : Id
540 {
541 .uid = static_cast<mode_t>(Catch(std::stoul(Catch(variables.at("UID")).or_default())).value_or(pw->pw_uid)),
542 .gid = static_cast<mode_t>(Catch(std::stoul(Catch(variables.at("GID")).or_default())).value_or(pw->pw_gid)),
543 };
544 // Create user
546 {
547 .id = id,
548 .name = (id.uid == 0)? "root"
549 : variables.contains("USER")? variables.at("USER")
550 : ns_env::get_expected("USER").value_or(pw->pw_name),
551 .path_dir_home = (id.uid == 0)? "/root"
552 : variables.contains("HOME")? variables.at("HOME")
553 : ns_env::get_expected("HOME").value_or(pw->pw_dir),
554 .path_file_shell = variables.contains("SHELL")? fs::path{variables.at("SHELL")}
555 : path.bin.bash,
556 .path_file_bashrc = path.file.bashrc,
557 .path_file_passwd = path.file.passwd,
558 });
559 // Write files
560 Pop(user.write_bashrc(path.file.bashrc, variables.contains("PS1")? variables.at("PS1") : ""));
561 Pop(user.write_passwd(path.file.passwd));
562 return user;
563 }
564
565 ns_reserved::ns_overlay::OverlayType overlay_type()
566 {
567 // Configure overlay type
568 using ns_reserved::ns_overlay::OverlayType;
569 OverlayType overlay_type = ns_env::exists("FIM_OVERLAY", "unionfs")? ns_reserved::ns_overlay::OverlayType::UNIONFS
570 : ns_env::exists("FIM_OVERLAY", "overlayfs")? ns_reserved::ns_overlay::OverlayType::OVERLAYFS
571 : ns_env::exists("FIM_OVERLAY", "bwrap")? ns_reserved::ns_overlay::OverlayType::BWRAP
572 : ns_reserved::ns_overlay::read(path.bin.self).value_or(OverlayType::BWRAP).get();
573
574 // Check for case folding usage constraints
575 if(flags.is_casefold and overlay_type == ns_reserved::ns_overlay::OverlayType::BWRAP)
576 {
577 logger("W::casefold cannot be used with bwrap overlayfs, falling back to unionfs");
578 overlay_type = ns_reserved::ns_overlay::OverlayType::UNIONFS;
579 }
580 return overlay_type;
581 }
582}; // struct FlatImage
583
590{
591 // Distribution
592 Distribution const distribution = Pop(Distribution::from_string(FIM_DIST));
593
594 // Standard paths
595 Path path = Pop(Path::create());
596
597 // Flags
598 Flags flags = Pop(Flags::create(path.bin.self));
599
600 // Log files
601 Logs logs = Try(Logs(path.dir.instance / "logs"));
602
603 // Gather layers
605 layers.push_binary(path.bin.self, FIM_RESERVED_OFFSET + FIM_RESERVED_SIZE);
606 layers.push_from_var("FIM_LAYERS").discard("W::Failed to setup FIM_LAYERS");
607 layers.push(path.dir.host_data_layers).discard("W::Failed to setup host_data_layers");
608
609 // Module configuration
611 layers,
612 flags.is_casefold,
613 path.dir.instance,
614 path.dir.host_data,
615 path.bin.janitor,
616 path.bin.self,
617 path.bin.portal_daemon,
618 path.dir.portal
619 ));
620
621 // LD_LIBRARY_PATH
622 if ( auto ret = ns_env::get_expected<"D">("LD_LIBRARY_PATH") )
623 {
624 ns_env::set("LD_LIBRARY_PATH"
625 , std::format("/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu:{}", ret.value())
626 , ns_env::Replace::Y
627 );
628 }
629 else
630 {
631 ns_env::set("LD_LIBRARY_PATH"
632 , "/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu"
633 , ns_env::Replace::Y
634 );
635 }
636
637 // PATH
638 std::string env_path = path.dir.app_bin.string()
639 + ":"
640 + ns_env::get_expected("PATH").value_or("")
641 + ":"
642 + "/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin"
643 + ":"
644 + path.dir.app_sbin.string();
645 ns_env::set("PATH", env_path, ns_env::Replace::Y);
646
647 // Get the current instance's pid
648 pid_t pid = getpid();
649
650 // Set environment variables
651 Pop(ns_env::get_expected("FIM_BIN_SELF"), "C::Path to self is not defined");
652 ns_env::set("FIM_DIR_SELF", path.dir.self, ns_env::Replace::Y);
653 ns_env::set("FIM_DIR_GLOBAL", path.dir.global, ns_env::Replace::Y);
654 ns_env::set("FIM_DIR_APP", path.dir.app, ns_env::Replace::Y);
655 ns_env::set("FIM_DIR_APP_BIN", path.dir.app_bin, ns_env::Replace::Y);
656 ns_env::set("FIM_DIR_APP_SBIN", path.dir.app_sbin, ns_env::Replace::Y);
657 ns_env::set("FIM_DIR_INSTANCE", path.dir.instance, ns_env::Replace::Y);
658 ns_env::set("FIM_DIR_LAYERS", path.dir.host_data_layers, ns_env::Replace::Y);
659 ns_env::set("FIM_PID", pid, ns_env::Replace::Y);
660 ns_env::set("FIM_DIST", FIM_DIST, ns_env::Replace::Y);
661 ns_env::set("FIM_DIR_RUNTIME", path.dir.runtime, ns_env::Replace::Y);
662 ns_env::set("FIM_DIR_RUNTIME_HOST", path.dir.runtime_host, ns_env::Replace::Y);
663 ns_env::set("FIM_DIR_DATA", path.dir.host_data, ns_env::Replace::Y);
664
665 // Create FlatImage object
666 return std::shared_ptr<FlatImage>(new FlatImage{
667 .distribution = distribution,
668 .pid = pid,
669 .flags = flags,
670 .logs = logs,
671 .config = config,
672 .path = path,
673 });
674}
675
676} // namespace ns_config
677
678
679/* vim: set expandtab fdm=marker ts=2 sw=2 tw=100 et :*/
Configures and launches bubblewrap
Manages the casefold reserved space.
Defines all fundamental FlatImage paths.
Definition config.hpp:143
static Value< Path > create()
Factory method to create Path configuration.
Definition config.hpp:257
Manages external DwarFS layer files and directories for the filesystem controller.
Definition layers.hpp:60
Value< void > push_from_var(std::string_view var)
Loads layers from a colon-separated environment variable.
Definition layers.hpp:148
Value< void > push(fs::path const &path)
Adds a layer from a file or directory path.
Definition layers.hpp:119
void push_binary(fs::path const &path_file_binary, uint64_t offset)
Scans a binary file for embedded DwarFS filesystems.
Definition layers.hpp:195
Manages filesystems used by flatimage.
Defines a class that manages FlatImage's portal configuration.
Manages environment variables in flatimage.
Defines a class that manages FlatImage's portal dispatcher configuration.
Custom enumeration class.
Enhanced error handling framework built on std::expected.
Layer management for DwarFS filesystems.
A library for manipulating environment variables.
A library for file logging.
#define logger(fmt,...)
Compile-time log level dispatch macro with automatic location capture.
Definition log.hpp:682
Simplified macros for common control flow patterns with optional logging.
Bubblewrap proxy types and user configuration.
Central FlatImage configuration system.
Value< std::shared_ptr< FlatImage > > config()
Factory method that makes a FlatImage configuration object.
Definition config.hpp:589
Value< std::vector< std::string > > get(fs::path const &path_file_binary)
Get existing variables from the database.
Definition env.hpp:144
Value< std::string > get_expected(std::string_view name)
Get the value of an environment variable.
Definition env.hpp:65
bool exists(std::string_view name, std::string_view value)
Checks if variable exists and equals value.
Definition env.hpp:82
void set(T &&name, U &&value, Replace replace)
Sets an environment variable.
Definition env.hpp:52
FlatImage filesystem layer implementations.
Value< fs::path > create_directories(fs::path const &p)
Creates directories recursively.
Value< uint8_t > read(fs::path const &path_file_binary)
Read a notification flag from the flatimage binary.
Definition casefold.hpp:61
Value< uint8_t > read(fs::path const &path_file_binary)
Read a notification flag from the flatimage binary.
Definition notify.hpp:59
Value< OverlayType > read(fs::path const &path_file_binary)
Read the overlay mask from the flatimage binary.
Definition overlay.hpp:72
Manages the notify reserved space.
Manages the overlay reserved space.
Filesystem helpers.
Enhanced expected type with integrated logging capabilities.
Definition expected.hpp:44
A pair of uid and gid mode_t values.
Definition bwrap.hpp:64
Log files used by bwrap.
Definition bwrap.hpp:84
The representation of a user in bubblewrap.
Definition bwrap.hpp:96
Portal daemon configuration.
Definition config.hpp:360
ns_db::ns_portal::ns_daemon::Daemon const host
Host-side portal daemon.
Definition config.hpp:361
ns_db::ns_portal::ns_daemon::Daemon const guest
Guest-side portal daemon.
Definition config.hpp:362
Module configurations linked with FlatImage paths.
Definition config.hpp:346
ns_filesystems::ns_controller::Config fuse
Fuse subsystem configuration.
Definition config.hpp:352
static Value< Config > create(ns_filesystems::ns_layers::Layers const &layers, bool const is_casefold, fs::path const &path_dir_instance, fs::path const &path_dir_host_data, fs::path const &path_bin_janitor, fs::path const &path_bin_self, fs::path const &path_bin_portal_daemon, fs::path const &path_dir_portal)
Factory method to create Config.
Definition config.hpp:381
Runtime feature flags.
Definition config.hpp:476
static Value< Flags > create(fs::path const &path_bin_self)
Factory method to create Flags.
Definition config.hpp:498
bool is_debug
Enable debug logging? Set via FIM_DEBUG=1.
Definition config.hpp:482
bool is_notify
Show desktop notifications? Stored in reserved space.
Definition config.hpp:484
bool is_casefold
Enable case-insensitive filesystem? Via FIM_CASEFOLD or reserved space.
Definition config.hpp:483
bool is_root
Execute as root (UID=0)? Checked via FIM_ROOT env or stored UID.
Definition config.hpp:481
Main FlatImage configuration object.
Definition config.hpp:519
pid_t const pid
Current instance process ID.
Definition config.hpp:521
Path path
Directory, file, and binary paths.
Definition config.hpp:525
Distribution const distribution
Linux distribution (ARCH/ALPINE/BLUEPRINT)
Definition config.hpp:520
Flags flags
Runtime feature flags.
Definition config.hpp:522
Logs logs
Log file paths for all subsystems.
Definition config.hpp:523
Config config
Module configurations (filesystem, daemon)
Definition config.hpp:524
Log file paths for all FlatImage subsystems.
Definition config.hpp:308
ns_bwrap::ns_proxy::Logs const bwrap
Bubblewrap sandbox log paths.
Definition config.hpp:309
ns_db::ns_portal::ns_daemon::ns_log::Logs const daemon_guest
Guest portal daemon logs.
Definition config.hpp:311
fs::path const path_file_boot
Boot initialization log file.
Definition config.hpp:314
ns_db::ns_portal::ns_dispatcher::Logs const dispatcher
Portal dispatcher logs.
Definition config.hpp:312
ns_db::ns_portal::ns_daemon::ns_log::Logs const daemon_host
Host portal daemon logs.
Definition config.hpp:310
ns_filesystems::ns_controller::Logs const filesystems
Filesystem subsystem logs.
Definition config.hpp:313
Paths to embedded and extracted binaries.
Definition config.hpp:227
fs::path const portal_daemon
Portal daemon for host-container IPC.
Definition config.hpp:231
fs::path const self
Path to the FlatImage binary itself.
Definition config.hpp:228
fs::path const portal_dispatcher
Portal dispatcher for command routing.
Definition config.hpp:232
fs::path const janitor
Janitor cleanup process.
Definition config.hpp:230
fs::path const bash
Embedded bash shell.
Definition config.hpp:229
Directory paths used throughout FlatImage.
Definition config.hpp:149
fs::path const app
Application directory (versioned by commit/timestamp)
Definition config.hpp:152
fs::path const app_bin
Application binaries directory.
Definition config.hpp:153
fs::path const runtime
Runtime directory (/tmp/fim/run)
Definition config.hpp:157
fs::path const runtime_host
Host-side runtime directory.
Definition config.hpp:158
fs::path const host_data_layers
Layers directory in data directory.
Definition config.hpp:162
fs::path const app_sbin
Application system binaries directory.
Definition config.hpp:154
fs::path const self
Parent directory of the FlatImage binary.
Definition config.hpp:150
fs::path const global
Global temporary directory (/tmp/fim)
Definition config.hpp:151
fs::path const host_data
Data directory next to binary.
Definition config.hpp:160
fs::path const instance
Instance-specific directory (per-PID)
Definition config.hpp:155
fs::path const host_data_tmp
Temporary files in data directory.
Definition config.hpp:161
fs::path const portal
Portal directory for IPC.
Definition config.hpp:156
fs::path const host_home
Relative path to user's home directory.
Definition config.hpp:159
Instance-specific configuration files.
Definition config.hpp:210
fs::path const bashrc
Path to instance-specific bashrc file.
Definition config.hpp:211
fs::path const passwd
Path to instance-specific passwd file.
Definition config.hpp:212