omegon 0.6.18 → 0.6.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,6 +31,12 @@ export interface Dep {
|
|
|
31
31
|
url?: string;
|
|
32
32
|
/** Dep IDs that must be installed first */
|
|
33
33
|
requires?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* Optional preflight check. If it returns a string, that string is a
|
|
36
|
+
* blocking message shown to the operator explaining what they need to do
|
|
37
|
+
* manually before this dep can be installed. Return undefined if ready.
|
|
38
|
+
*/
|
|
39
|
+
preflight?: () => string | undefined;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
export interface InstallOption {
|
|
@@ -53,6 +59,12 @@ function ensureToolPaths(): void {
|
|
|
53
59
|
"/nix/var/nix/profiles/default/bin",
|
|
54
60
|
join(home, ".nix-profile", "bin"),
|
|
55
61
|
join(home, ".cargo", "bin"),
|
|
62
|
+
// Linuxbrew
|
|
63
|
+
"/home/linuxbrew/.linuxbrew/bin",
|
|
64
|
+
join(home, ".linuxbrew", "bin"),
|
|
65
|
+
// macOS Homebrew
|
|
66
|
+
"/opt/homebrew/bin",
|
|
67
|
+
"/usr/local/bin",
|
|
56
68
|
];
|
|
57
69
|
const current = process.env.PATH ?? "";
|
|
58
70
|
const parts = current.split(":");
|
|
@@ -63,6 +75,52 @@ function ensureToolPaths(): void {
|
|
|
63
75
|
}
|
|
64
76
|
ensureToolPaths();
|
|
65
77
|
|
|
78
|
+
/** Detect ostree-based immutable Linux (Bazzite, Silverblue, Kinoite, Bluefin, etc.) */
|
|
79
|
+
function isOstree(): boolean {
|
|
80
|
+
if (process.platform !== "linux") return false;
|
|
81
|
+
try {
|
|
82
|
+
execSync("which rpm-ostree", { stdio: "ignore" });
|
|
83
|
+
return true;
|
|
84
|
+
} catch {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* On Fedora 42+ ostree systems, `/` is read-only by default (composefs).
|
|
91
|
+
* Nix needs to create `/nix` which requires `root.transient = true` in the
|
|
92
|
+
* ostree prepare-root config. Returns blocking instructions if not ready.
|
|
93
|
+
*/
|
|
94
|
+
function checkOstreeReadyForNix(): string | undefined {
|
|
95
|
+
// If /nix already exists, we're good (previous install or already configured)
|
|
96
|
+
if (existsSync("/nix")) return undefined;
|
|
97
|
+
|
|
98
|
+
// Check if root.transient is enabled
|
|
99
|
+
try {
|
|
100
|
+
const conf = execSync("cat /etc/ostree/prepare-root.conf 2>/dev/null", { encoding: "utf-8" });
|
|
101
|
+
if (/transient\s*=\s*true/i.test(conf)) return undefined;
|
|
102
|
+
} catch { /* file doesn't exist */ }
|
|
103
|
+
|
|
104
|
+
return [
|
|
105
|
+
"⚠️ Your system has a read-only root filesystem (ostree/composefs).",
|
|
106
|
+
"Nix needs `/nix` to exist, which requires enabling root.transient.",
|
|
107
|
+
"",
|
|
108
|
+
"Run these commands in your terminal, then reboot and run /bootstrap again:",
|
|
109
|
+
"",
|
|
110
|
+
"```",
|
|
111
|
+
"sudo tee /etc/ostree/prepare-root.conf <<'EOL'",
|
|
112
|
+
"[composefs]",
|
|
113
|
+
"enabled = yes",
|
|
114
|
+
"[root]",
|
|
115
|
+
"transient = true",
|
|
116
|
+
"EOL",
|
|
117
|
+
"",
|
|
118
|
+
"sudo rpm-ostree initramfs-etc --track=/etc/ostree/prepare-root.conf",
|
|
119
|
+
"systemctl reboot",
|
|
120
|
+
"```",
|
|
121
|
+
].join("\n");
|
|
122
|
+
}
|
|
123
|
+
|
|
66
124
|
function hasCmd(cmd: string): boolean {
|
|
67
125
|
try {
|
|
68
126
|
execSync(`which ${cmd}`, { stdio: "ignore" });
|
|
@@ -105,13 +163,19 @@ export const DEPS: Dep[] = [
|
|
|
105
163
|
tier: "core",
|
|
106
164
|
check: () => hasCmd("nix"),
|
|
107
165
|
install: [
|
|
108
|
-
//
|
|
109
|
-
//
|
|
110
|
-
//
|
|
111
|
-
//
|
|
112
|
-
{ platform: "
|
|
166
|
+
// Immutable ostree-based Linux (Bazzite, Silverblue, Bluefin, etc.)
|
|
167
|
+
// needs root.transient enabled and --persistence=/var/lib/nix so the
|
|
168
|
+
// nix store lives on a writable partition. The upstream installer uses
|
|
169
|
+
// the ostree planner automatically when it detects ostree.
|
|
170
|
+
{ platform: "linux", cmd: isOstree()
|
|
171
|
+
? "curl -sSfL https://install.determinate.systems/nix | sh -s -- install --no-confirm --persistence=/var/lib/nix"
|
|
172
|
+
: "curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm" },
|
|
173
|
+
{ platform: "darwin", cmd: "curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm" },
|
|
113
174
|
],
|
|
114
175
|
url: "https://zero-to-nix.com",
|
|
176
|
+
// On ostree systems, root.transient must be enabled first for /nix to be created.
|
|
177
|
+
// preflight returns instructions if the system isn't ready.
|
|
178
|
+
preflight: isOstree() ? checkOstreeReadyForNix : undefined,
|
|
115
179
|
},
|
|
116
180
|
{
|
|
117
181
|
id: "ollama",
|
|
@@ -1075,6 +1075,15 @@ async function installDeps(ctx: CommandContext, deps: DepStatus[]): Promise<void
|
|
|
1075
1075
|
const { dep } = sorted[i];
|
|
1076
1076
|
const step = `[${i + 1}/${total}]`;
|
|
1077
1077
|
|
|
1078
|
+
// Preflight check — some deps need manual system prep before install
|
|
1079
|
+
if (dep.preflight) {
|
|
1080
|
+
const blocker = dep.preflight();
|
|
1081
|
+
if (blocker) {
|
|
1082
|
+
ctx.ui.notify(`\n${step} 🛑 ${dep.name} — manual setup required:\n\n${blocker}`);
|
|
1083
|
+
continue;
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1078
1087
|
// Check prerequisites — re-verify availability live (not from stale array)
|
|
1079
1088
|
if (dep.requires?.length) {
|
|
1080
1089
|
const unmet = dep.requires.filter((reqId) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omegon",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.20",
|
|
4
4
|
"description": "Omegon — an opinionated distribution of pi (by Mario Zechner) with extensions for lifecycle management, memory, orchestration, and visualization",
|
|
5
5
|
"bin": {
|
|
6
6
|
"omegon": "bin/omegon.mjs",
|