Skip to content

Commit 0ef04ca

Browse files
committed
GTK4/WebKitGTK 6.0 build stack with dev headers, QEMU VM module, and automatic pkg-config resolution
- feat(desktop): upgrade from GTK3 to GTK4 + WebKitGTK 6.0 + libsoup_3 + Vulkan — Wails 3 and WebKit-based GUI apps can now build and run inside the container - feat(desktop): add .dev outputs (gtk4, glib, cairo, pango, harfbuzz, graphene, libepoxy, wayland, X11, etc.) and xorg.xorgproto — CGo/native builds find all headers and .pc files without manual flags - fix(desktop): set PKG_CONFIG_PATH via home.sessionVariables to profile's lib/pkgconfig + share/pkgconfig — `pkg-config --cflags gtk4 x11` works out of the box instead of returning empty - feat(vm): add vm.nix module with QEMU full-system emulation, swtpm TPM 2.0, and OVMF UEFI firmware (x86-only) — enables Windows/Linux VM provisioning from within a container - feat(build): add wimlib for WIM/ESD archive manipulation (x86-only) — supports Windows ISO assembly workflows - chore(flake): enable x86_64-linux in nix flake checks — CI validates all stacks on x86 in addition to aarch64
1 parent 4296d9b commit 0ef04ca

5 files changed

Lines changed: 74 additions & 17 deletions

File tree

‎nixhome/flake.nix‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@
320320
};
321321
in map check packages;
322322
in {
323+
x86_64-linux = mkCheck "x86_64-linux";
323324
aarch64-linux = mkCheck "aarch64-linux";
324325
aarch64-darwin = mkCheck "aarch64-darwin";
325326
};
@@ -353,6 +354,7 @@
353354
packages = cfg.config.home.packages;
354355
in builtins.deepSeq (map (p: p.drvPath) packages) (builtins.length packages);
355356
in {
357+
x86_64-linux = mkStrictCheck "x86_64-linux";
356358
aarch64-linux = mkStrictCheck "aarch64-linux";
357359
aarch64-darwin = mkStrictCheck "aarch64-darwin";
358360
};

‎nixhome/modules/build.nix‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ in {
2828
flex
2929
bison
3030
libxslt # libxslt1-dev
31+
] ++ lib.optionals pkgs.stdenv.isx86_64 [
32+
wimlib # WIM/ESD archive library — depends on syslinux (x86-only)
3133
];
3234
};
3335
}

‎nixhome/modules/desktop/default.nix‎

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -143,29 +143,53 @@ in
143143
# Terminal emulator — launched from WM menu
144144
xterm
145145

146-
# X11 client libraries
146+
# ── X11 client libraries ─────────────────────────────────────────────
147147
xorg.libX11
148148
xorg.libXcursor
149149
xorg.libxkbfile
150150
xorg.libXrandr
151151

152-
# Graphics / rendering libraries
153-
cairo # 2D vector graphics (libcairo2)
154-
fontconfig # font configuration (libfontconfig)
155-
freetype # font rendering (libfreetype6)
156-
libGL # OpenGL (libegl1-mesa / libgl1-mesa)
157-
mesa # Mesa 3D — provides llvmpipe software rasterizer for GLX on Xvfb
158-
glew # OpenGL extension library (libglew2.2)
159-
libGLU # OpenGL utility library (libglu1-mesa)
160-
libtiff # TIFF image library (libtiff5)
161-
162-
# D-Bus session bus — SNI tray icons (Electron, modern GTK) need it
152+
# ── Graphics / rendering ───────────────────────────────────────────
153+
cairo
154+
fontconfig
155+
freetype
156+
vulkan-loader
157+
libGL
158+
mesa # llvmpipe software rasterizer for GLX on Xvfb
159+
glew
160+
libGLU
161+
libtiff
162+
163+
# ── D-Bus / tray ───────────────────────────────────────────────────
163164
dbus
164-
# SNI→XEmbed proxy — bridges modern tray icons (Wails, Electron, GTK3+) to IceWM's XEmbed tray
165-
snixembed
166-
167-
# GTK 3 — required by many GUI apps and dialogs
168-
gtk3
165+
snixembed # SNI→XEmbed proxy for IceWM tray
166+
167+
# ── GTK4 / WebKit / Wails 3 build stack ────────────────────────────
168+
# Runtime libraries
169+
pkg-config
170+
gtk4
171+
webkitgtk_6_0
172+
libsoup_3
173+
174+
# Dev headers (.pc files for CGo / native builds)
175+
gtk4.dev
176+
webkitgtk_6_0.dev
177+
glib.dev
178+
libsoup_3.dev
179+
cairo.dev
180+
pango.dev
181+
harfbuzz.dev
182+
gdk-pixbuf.dev
183+
graphene.dev
184+
libepoxy.dev
185+
vulkan-loader.dev
186+
xorg.xorgproto # X protocol headers — transitive dep of x11.pc
187+
xorg.libX11.dev
188+
xorg.libXrandr.dev
189+
xorg.libXi.dev
190+
xorg.libXcursor.dev
191+
libxkbcommon.dev
192+
wayland.dev
169193

170194
# wxWidgets GUI toolkit (libwxgtk3.2-1, libwxgtk-webview3.2-1)
171195
wxGTK32 # wxWidgets 3.2.x; attribute = wxGTK32, pname = "wxwidgets"
@@ -249,6 +273,7 @@ in
249273
# Mesa llvmpipe software rendering — headless container has no GPU.
250274
# Paths go through the profile symlink (stable across generations) rather
251275
# than hardcoded store hashes that break on rebuild.
276+
home.sessionVariables.PKG_CONFIG_PATH = "${config.home.profileDirectory}/lib/pkgconfig:${config.home.profileDirectory}/share/pkgconfig";
252277
home.sessionVariables.LIBGL_ALWAYS_SOFTWARE = "1";
253278
home.sessionVariables.GALLIUM_DRIVER = "llvmpipe";
254279
home.sessionVariables.LIBGL_DRIVERS_PATH = "${config.home.profileDirectory}/lib/dri";

‎nixhome/modules/vm.nix‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# vm — QEMU virtualisation and disk-image tooling
2+
{pkgs, config, lib, ...}: let
3+
cfg = config.devcell.modules.vm;
4+
in {
5+
options.devcell.modules.vm = {
6+
enable = lib.mkEnableOption "QEMU virtualisation: full system emulation (x86, ARM), disk image utilities, UEFI firmware";
7+
meta = lib.mkOption {
8+
type = lib.types.attrs;
9+
readOnly = true;
10+
default = {
11+
description = "QEMU system emulation (x86_64, aarch64), qemu-img/qemu-nbd utilities, OVMF UEFI firmware, swtpm TPM emulator";
12+
mcpServers = [];
13+
sizeMb = 800;
14+
};
15+
};
16+
};
17+
18+
config = lib.mkIf cfg.enable {
19+
home.packages = with pkgs; [
20+
qemu # full system emulation + utilities (use: qemu-system-x86_64, qemu-system-aarch64, qemu-img, qemu-nbd)
21+
swtpm # software TPM 2.0 emulator — required for Windows 11 guests
22+
] ++ lib.optionals pkgs.stdenv.isx86_64 [
23+
OVMF # UEFI firmware for x86_64 VMs — depends on syslinux (x86-only)
24+
];
25+
};
26+
}

‎nixhome/stacks/ultimate.nix‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
../modules/shell.nix
2222
../modules/social.nix
2323
../modules/travel.nix
24+
../modules/vm.nix
2425
../modules/wine.nix
2526
];
2627

@@ -36,6 +37,7 @@
3637
devcell.modules.security.enable = true;
3738
devcell.modules.social.enable = true;
3839
devcell.modules.travel.enable = true;
40+
devcell.modules.vm.enable = true;
3941
devcell.modules.wine.enable = true;
4042
devcell.modules.plex.enable = true; # from ../modules/media
4143
}

0 commit comments

Comments
 (0)