alpha
Login
or
Join now
lass.pds.lassul.us
/
superconfig
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
1
Pipelines
machines.pixel8: init with test image
author
lassulus
date
8 months ago
(Feb 10, 2026, 9:46 PM CET)
commit
8fec3e9c
8fec3e9c6cdda78db018b5289fac23094f2e9bf3
parent
3700b7dd
3700b7ddedadbc4e6ee86ef9c59df8ff2a0642c2
+344
-67
7 changed files
Expand all
Collapse all
Unified
Split
flake.lock
flake.nix
machines
pixel8
boot-img.nix
flake-module.nix
initramfs.nix
kernel.nix
mkbootimg.nix
+29
-67
flake.lock
View file
Reviewed
···
39
39
"treefmt-nix": "treefmt-nix"
40
40
},
41
41
"locked": {
42
42
-
"lastModified": 1770312651,
43
43
-
"narHash": "sha256-zTKBWCRzeFeO3SSgXXnD3e8Li6k+/ybDZvFAhtSVuy4=",
42
42
+
"lastModified": 1770670054,
43
43
+
"narHash": "sha256-usUGqo0LtHa69ovqharjnGN1U0Ghcv25J6t8ZUhWcXw=",
44
44
"ref": "refs/heads/main",
45
45
-
"rev": "33bf2786d8c1077187790166e2a23fa4e5553834",
46
46
-
"revCount": 12772,
45
45
+
"rev": "1830ea04658b6234f6268bb66ab2c328bf8e700c",
46
46
+
"revCount": 12873,
47
47
"type": "git",
48
48
"url": "https://git.clan.lol/clan/clan-core"
49
49
},
···
68
68
]
69
69
},
70
70
"locked": {
71
71
-
"lastModified": 1770222022,
72
72
-
"narHash": "sha256-IfQsvunBPaMs9Bc5oI1sMLCn9yVw7MqmkqdtSvATgpQ=",
73
73
-
"rev": "514b5411fa3afa8f6250c0bdf1d7cc19229b2234",
71
71
+
"lastModified": 1770580383,
72
72
+
"narHash": "sha256-fEpF46+YO+jz4X+kahCbgLpRzWRB8wlPiw3lzDcWFpI=",
73
73
+
"rev": "f6d0b3d4685c9f44e2c4f479e8fcac17ea923abb",
74
74
"type": "tarball",
75
75
-
"url": "https://git.clan.lol/api/v1/repos/clan/data-mesher/archive/514b5411fa3afa8f6250c0bdf1d7cc19229b2234.tar.gz"
75
75
+
"url": "https://git.clan.lol/api/v1/repos/clan/data-mesher/archive/f6d0b3d4685c9f44e2c4f479e8fcac17ea923abb.tar.gz"
76
76
},
77
77
"original": {
78
78
"type": "tarball",
···
191
191
]
192
192
},
193
193
"locked": {
194
194
-
"lastModified": 1768135262,
195
195
-
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
194
194
+
"lastModified": 1769996383,
195
195
+
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
196
196
"owner": "hercules-ci",
197
197
"repo": "flake-parts",
198
198
-
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
198
198
+
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
199
199
"type": "github"
200
200
},
201
201
"original": {
···
268
268
"treefmt-nix": "treefmt-nix_3"
269
269
},
270
270
"locked": {
271
271
-
"lastModified": 1770325891,
272
272
-
"narHash": "sha256-7ipAUiPb798BRdV56+3bxa71fdleMxlS/XvIGUYO1qI=",
271
271
+
"lastModified": 1770647950,
272
272
+
"narHash": "sha256-5IBnmc6yMO4p26kJfHQylCJEci8X8vhp5AYG41yjNU8=",
273
273
"owner": "numtide",
274
274
"repo": "llm-agents.nix",
275
275
-
"rev": "54aeaa16a2f836142fba98a455e0373e3f464ac5",
275
275
+
"rev": "752fd7ca23ccbe5f5b00c0c65db9d8dbb755e119",
276
276
"type": "github"
277
277
},
278
278
"original": {
···
370
370
},
371
371
"nix-rosetta-builder": {
372
372
"inputs": {
373
373
-
"nixos-generators": "nixos-generators",
374
373
"nixpkgs": [
375
374
"nixpkgs"
376
375
]
377
376
},
378
377
"locked": {
379
379
-
"lastModified": 1756177999,
380
380
-
"narHash": "sha256-aSbB7/jrt7ujiJ55f2uGhOo+usGxVSkqbAMVgg2jDls=",
378
378
+
"lastModified": 1770491098,
379
379
+
"narHash": "sha256-ZfhynJqgV3A9hEivcgOEZa+TZnJPc26lIUjzKsSchgI=",
381
380
"owner": "cpick",
382
381
"repo": "nix-rosetta-builder",
383
383
-
"rev": "ebb7162a975074fb570a2c3ac02bc543ff2e9df4",
382
382
+
"rev": "50e6070082e0b4fbaf67dd8f346892a1a9ed685c",
384
383
"type": "github"
385
384
},
386
385
"original": {
···
424
423
"url": "https://cgit.krebsco.de/nix-writers"
425
424
}
426
425
},
427
427
-
"nixlib": {
428
428
-
"locked": {
429
429
-
"lastModified": 1736643958,
430
430
-
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
431
431
-
"owner": "nix-community",
432
432
-
"repo": "nixpkgs.lib",
433
433
-
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
434
434
-
"type": "github"
435
435
-
},
436
436
-
"original": {
437
437
-
"owner": "nix-community",
438
438
-
"repo": "nixpkgs.lib",
439
439
-
"type": "github"
440
440
-
}
441
441
-
},
442
426
"nixos-facter": {
443
427
"locked": {
444
428
"lastModified": 1766558141,
···
454
438
"type": "github"
455
439
}
456
440
},
457
457
-
"nixos-generators": {
458
458
-
"inputs": {
459
459
-
"nixlib": "nixlib",
460
460
-
"nixpkgs": [
461
461
-
"nix-rosetta-builder",
462
462
-
"nixpkgs"
463
463
-
]
464
464
-
},
465
465
-
"locked": {
466
466
-
"lastModified": 1737057290,
467
467
-
"narHash": "sha256-3Pe0yKlCc7EOeq1X/aJVDH0CtNL+tIBm49vpepwL1MQ=",
468
468
-
"owner": "nix-community",
469
469
-
"repo": "nixos-generators",
470
470
-
"rev": "d002ce9b6e7eb467cd1c6bb9aef9c35d191b5453",
471
471
-
"type": "github"
472
472
-
},
473
473
-
"original": {
474
474
-
"owner": "nix-community",
475
475
-
"repo": "nixos-generators",
476
476
-
"type": "github"
477
477
-
}
478
478
-
},
479
441
"nixos-hardware": {
480
442
"locked": {
481
481
-
"lastModified": 1769302137,
482
482
-
"narHash": "sha256-QEDtctEkOsbx8nlFh4yqPEOtr4tif6KTqWwJ37IM2ds=",
443
443
+
"lastModified": 1770631810,
444
444
+
"narHash": "sha256-b7iK/x+zOXbjhRqa+XBlYla4zFvPZyU5Ln2HJkiSnzc=",
483
445
"owner": "nixos",
484
446
"repo": "nixos-hardware",
485
485
-
"rev": "a351494b0e35fd7c0b7a1aae82f0afddf4907aa8",
447
447
+
"rev": "2889685785848de940375bf7fea5e7c5a3c8d502",
486
448
"type": "github"
487
449
},
488
450
"original": {
···
493
455
},
494
456
"nixpkgs": {
495
457
"locked": {
496
496
-
"lastModified": 1770197578,
497
497
-
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
458
458
+
"lastModified": 1770562336,
459
459
+
"narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=",
498
460
"owner": "nixos",
499
461
"repo": "nixpkgs",
500
500
-
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
462
462
+
"rev": "d6c71932130818840fc8fe9509cf50be8c64634f",
501
463
"type": "github"
502
464
},
503
465
"original": {
···
516
478
"systems": "systems_4"
517
479
},
518
480
"locked": {
519
519
-
"lastModified": 1770025103,
520
520
-
"narHash": "sha256-Qlb19PP0n6s+v1MywVjROV5XwsCvA58XXiXHk0Govb4=",
481
481
+
"lastModified": 1770630823,
482
482
+
"narHash": "sha256-5SEmOnJ61vmbap39vzWEsCX5UQ+3Ul8J4mXWKdqSn3w=",
521
483
"owner": "nix-community",
522
484
"repo": "nixvim",
523
523
-
"rev": "31c3b3687dc85e3fbbf5c44728a5ee231608f8a9",
485
485
+
"rev": "6acc964664ac916c64fe4e394edd467af4d90790",
524
486
"type": "github"
525
487
},
526
488
"original": {
···
579
541
]
580
542
},
581
543
"locked": {
582
582
-
"lastModified": 1770145881,
583
583
-
"narHash": "sha256-ktjWTq+D5MTXQcL9N6cDZXUf9kX8JBLLBLT0ZyOTSYY=",
544
544
+
"lastModified": 1770526836,
545
545
+
"narHash": "sha256-xbvX5Ik+0inJcLJtJ/AajAt7xCk6FOCrm5ogpwwvVDg=",
584
546
"owner": "Mic92",
585
547
"repo": "sops-nix",
586
586
-
"rev": "17eea6f3816ba6568b8c81db8a4e6ca438b30b7c",
548
548
+
"rev": "d6e0e666048a5395d6ea4283143b7c9ac704720d",
587
549
"type": "github"
588
550
},
589
551
"original": {
+2
flake.nix
View file
Reviewed
···
181
181
./wrapperModules/flake-module.nix
182
182
./skills/flake-module.nix
183
183
./games/flake-module.nix
184
184
+
./machines/pixel8/flake-module.nix
184
185
]
185
186
++ (
186
187
# Auto-import all flake-module.nix files from tools subdirectories
···
206
207
machineName: _: builtins.pathExists ./machines/${machineName}/container.nix
207
208
) (builtins.readDir ./machines)
208
209
);
210
210
+
209
211
perSystem =
210
212
{
211
213
lib,
+75
machines/pixel8/boot-img.nix
View file
Reviewed
···
1
1
+
{
2
2
+
lib,
3
3
+
stdenvNoCC,
4
4
+
callPackage,
5
5
+
}:
6
6
+
7
7
+
let
8
8
+
kernel = callPackage ./kernel.nix { };
9
9
+
initramfs = callPackage ./initramfs.nix { };
10
10
+
mkbootimg = callPackage ./mkbootimg.nix { };
11
11
+
in
12
12
+
stdenvNoCC.mkDerivation {
13
13
+
pname = "pixel8-boot-img";
14
14
+
version = "0.1.0";
15
15
+
16
16
+
dontUnpack = true;
17
17
+
18
18
+
nativeBuildInputs = [ mkbootimg ];
19
19
+
20
20
+
buildPhase = ''
21
21
+
runHook preBuild
22
22
+
23
23
+
# Create boot.img for Pixel 8
24
24
+
# Using boot header version 4 for Android 12+ devices
25
25
+
mkbootimg \
26
26
+
--kernel ${kernel}/kernel/Image \
27
27
+
--ramdisk ${initramfs}/initrd \
28
28
+
--header_version 4 \
29
29
+
--os_version 14.0.0 \
30
30
+
--os_patch_level 2024-01 \
31
31
+
--pagesize 4096 \
32
32
+
--output boot.img
33
33
+
34
34
+
runHook postBuild
35
35
+
'';
36
36
+
37
37
+
installPhase = ''
38
38
+
runHook preInstall
39
39
+
40
40
+
mkdir -p $out
41
41
+
cp boot.img $out/
42
42
+
43
43
+
# Also provide the components separately for debugging
44
44
+
mkdir -p $out/components
45
45
+
ln -s ${kernel} $out/components/kernel
46
46
+
ln -s ${initramfs}/initrd $out/components/initrd
47
47
+
ln -s ${kernel}/dtbo.img $out/dtbo.img
48
48
+
49
49
+
# Create a flash script
50
50
+
cat > $out/flash.sh << 'EOF'
51
51
+
#!/bin/sh
52
52
+
set -e
53
53
+
echo "Flashing Pixel 8 boot image..."
54
54
+
echo "Make sure device is in fastboot mode (power + volume down)"
55
55
+
echo ""
56
56
+
echo "To flash temporarily (will revert on reboot):"
57
57
+
echo " fastboot boot ${placeholder "out"}/boot.img"
58
58
+
echo ""
59
59
+
echo "To flash permanently (DANGER - can brick device):"
60
60
+
echo " fastboot flash boot ${placeholder "out"}/boot.img"
61
61
+
echo ""
62
62
+
echo "To flash DTBO (may be needed):"
63
63
+
echo " fastboot flash dtbo ${placeholder "out"}/dtbo.img"
64
64
+
EOF
65
65
+
chmod +x $out/flash.sh
66
66
+
67
67
+
runHook postInstall
68
68
+
'';
69
69
+
70
70
+
meta = with lib; {
71
71
+
description = "Minimal NixOS boot image for Google Pixel 8";
72
72
+
license = licenses.gpl2Only;
73
73
+
platforms = platforms.all;
74
74
+
};
75
75
+
}
+23
machines/pixel8/flake-module.nix
View file
Reviewed
···
1
1
+
{ ... }:
2
2
+
{
3
3
+
perSystem =
4
4
+
{
5
5
+
pkgs,
6
6
+
...
7
7
+
}:
8
8
+
{
9
9
+
packages = {
10
10
+
# GrapheneOS prebuilt kernel for Pixel 8
11
11
+
pixel8-kernel = pkgs.callPackage ./kernel.nix { };
12
12
+
13
13
+
# Android boot image tools
14
14
+
mkbootimg = pkgs.callPackage ./mkbootimg.nix { };
15
15
+
16
16
+
# Minimal initramfs with debug shell
17
17
+
pixel8-initramfs = pkgs.callPackage ./initramfs.nix { };
18
18
+
19
19
+
# Complete boot image ready to flash
20
20
+
pixel8-boot-img = pkgs.callPackage ./boot-img.nix { };
21
21
+
};
22
22
+
};
23
23
+
}
+93
machines/pixel8/initramfs.nix
View file
Reviewed
···
1
1
+
{
2
2
+
pkgsCross,
3
3
+
makeInitrdNG,
4
4
+
writeScript,
5
5
+
callPackage,
6
6
+
}:
7
7
+
8
8
+
let
9
9
+
# Use aarch64 cross-compiled packages
10
10
+
aarch64 = pkgsCross.aarch64-multiplatform;
11
11
+
12
12
+
kernel = callPackage ./kernel.nix { };
13
13
+
14
14
+
# Modules needed for USB keyboard support
15
15
+
usbModules = [
16
16
+
"phy-exynos-usbdrd-eusb-super.ko"
17
17
+
"eusb_repeater.ko"
18
18
+
"dwc3-exynos-usb.ko"
19
19
+
"xhci-exynos.ko"
20
20
+
"xhci-goog-dma.ko"
21
21
+
];
22
22
+
23
23
+
# Minimal init script that loads USB modules and drops to shell
24
24
+
initScript = writeScript "init" ''
25
25
+
#!/bin/busybox sh
26
26
+
27
27
+
# Mount essential filesystems
28
28
+
/bin/busybox mkdir -p /proc /sys /dev /tmp /run /lib/modules
29
29
+
/bin/busybox mount -t proc proc /proc
30
30
+
/bin/busybox mount -t sysfs sys /sys
31
31
+
/bin/busybox mount -t devtmpfs dev /dev
32
32
+
/bin/busybox mount -t tmpfs tmp /tmp
33
33
+
34
34
+
# Setup busybox symlinks early
35
35
+
/bin/busybox --install -s /bin
36
36
+
37
37
+
# Print banner
38
38
+
echo ""
39
39
+
echo "====================================="
40
40
+
echo " NixOS Mobile - Pixel 8 Debug Shell"
41
41
+
echo "====================================="
42
42
+
echo ""
43
43
+
44
44
+
# Load USB modules for keyboard support
45
45
+
echo "Loading USB modules..."
46
46
+
for mod in ${builtins.concatStringsSep " " usbModules}; do
47
47
+
if [ -f "/lib/modules/$mod" ]; then
48
48
+
echo " Loading $mod"
49
49
+
insmod "/lib/modules/$mod" 2>/dev/null || echo " (failed or already loaded)"
50
50
+
fi
51
51
+
done
52
52
+
53
53
+
echo ""
54
54
+
echo "Kernel: $(uname -r)"
55
55
+
echo ""
56
56
+
echo "USB keyboard should work if connected via OTG adapter."
57
57
+
echo "If no input works, try connecting via USB serial/ADB."
58
58
+
echo ""
59
59
+
60
60
+
# Try to get a console - attempt multiple TTYs
61
61
+
for console in /dev/console /dev/tty0 /dev/tty1 /dev/ttyGS0; do
62
62
+
if [ -e "$console" ]; then
63
63
+
echo "Attempting shell on $console"
64
64
+
exec setsid sh -c "exec sh <$console >$console 2>&1"
65
65
+
fi
66
66
+
done
67
67
+
68
68
+
# Fallback - just exec shell
69
69
+
exec /bin/sh
70
70
+
'';
71
71
+
72
72
+
# Create module directory structure
73
73
+
moduleContents = map (mod: {
74
74
+
source = "${kernel}/modules/${mod}";
75
75
+
target = "/lib/modules/${mod}";
76
76
+
}) usbModules;
77
77
+
78
78
+
in
79
79
+
makeInitrdNG {
80
80
+
compressor = "gzip";
81
81
+
82
82
+
contents = [
83
83
+
{
84
84
+
# Use statically-linked aarch64 busybox
85
85
+
source = "${aarch64.busybox-sandbox-shell}";
86
86
+
target = "/bin/busybox";
87
87
+
}
88
88
+
{
89
89
+
source = initScript;
90
90
+
target = "/init";
91
91
+
}
92
92
+
] ++ moduleContents;
93
93
+
}
+62
machines/pixel8/kernel.nix
View file
Reviewed
···
1
1
+
{
2
2
+
lib,
3
3
+
stdenvNoCC,
4
4
+
fetchFromGitHub,
5
5
+
lz4,
6
6
+
}:
7
7
+
8
8
+
stdenvNoCC.mkDerivation rec {
9
9
+
pname = "pixel8-kernel-grapheneos";
10
10
+
version = "6.1-16-qpr2";
11
11
+
12
12
+
src = fetchFromGitHub {
13
13
+
owner = "GrapheneOS";
14
14
+
repo = "device_google_shusky-kernels_6.1";
15
15
+
rev = "16-qpr2";
16
16
+
hash = "sha256-bFYP0gdPQiQEf4wjwGyE8ocfKeYOWPLSBtkif3SDvzM=";
17
17
+
};
18
18
+
19
19
+
nativeBuildInputs = [ lz4 ];
20
20
+
21
21
+
installPhase = ''
22
22
+
runHook preInstall
23
23
+
24
24
+
mkdir -p $out/{kernel,dtbs,modules}
25
25
+
26
26
+
# Decompress kernel
27
27
+
lz4 -d grapheneos/Image.lz4 $out/kernel/Image
28
28
+
29
29
+
# Copy DTBs
30
30
+
cp grapheneos/*.dtb $out/dtbs/
31
31
+
32
32
+
# Copy DTBO image
33
33
+
cp grapheneos/dtbo.img $out/
34
34
+
35
35
+
# Copy all modules
36
36
+
cp grapheneos/*.ko $out/modules/
37
37
+
38
38
+
# Copy module loading configuration
39
39
+
cp grapheneos/modules.load $out/
40
40
+
cp grapheneos/init.insmod.shiba.cfg $out/
41
41
+
cp grapheneos/vendor_kernel_boot.modules.load $out/
42
42
+
43
43
+
# Copy System.map for debugging
44
44
+
cp grapheneos/System.map $out/
45
45
+
46
46
+
runHook postInstall
47
47
+
'';
48
48
+
49
49
+
# No compilation, just file copies - can build on any platform
50
50
+
dontStrip = true;
51
51
+
dontPatchELF = true;
52
52
+
dontFixup = true;
53
53
+
54
54
+
meta = with lib; {
55
55
+
description = "GrapheneOS prebuilt kernel for Google Pixel 8 (shiba)";
56
56
+
homepage = "https://github.com/GrapheneOS/device_google_shusky-kernels_6.1";
57
57
+
license = licenses.gpl2Only;
58
58
+
# Contains aarch64 binaries, but can be unpacked on any platform
59
59
+
platforms = lib.platforms.all;
60
60
+
maintainers = [ ];
61
61
+
};
62
62
+
}
+60
machines/pixel8/mkbootimg.nix
View file
Reviewed
···
1
1
+
{
2
2
+
lib,
3
3
+
stdenvNoCC,
4
4
+
fetchgit,
5
5
+
python3,
6
6
+
}:
7
7
+
8
8
+
stdenvNoCC.mkDerivation {
9
9
+
pname = "mkbootimg";
10
10
+
version = "2025-02-10";
11
11
+
12
12
+
src = fetchgit {
13
13
+
url = "https://android.googlesource.com/platform/system/tools/mkbootimg";
14
14
+
rev = "d2bb0af5ba6d3198a3e99529c97eda1be0b5a093";
15
15
+
hash = "sha256-z7KklKf0dTyt7ZoUiZrMYRzU3h+WuLnc355LRtFMs2s=";
16
16
+
};
17
17
+
18
18
+
nativeBuildInputs = [ python3 ];
19
19
+
20
20
+
installPhase = ''
21
21
+
runHook preInstall
22
22
+
23
23
+
mkdir -p $out/bin $out/lib/mkbootimg
24
24
+
25
25
+
# Copy Python scripts and modules
26
26
+
cp mkbootimg.py unpack_bootimg.py repack_bootimg.py $out/lib/mkbootimg/
27
27
+
cp -r gki $out/lib/mkbootimg/
28
28
+
29
29
+
# Create wrapper scripts with PYTHONPATH set
30
30
+
cat > $out/bin/mkbootimg << EOF
31
31
+
#!/bin/sh
32
32
+
export PYTHONPATH="$out/lib/mkbootimg:\$PYTHONPATH"
33
33
+
exec ${python3}/bin/python3 $out/lib/mkbootimg/mkbootimg.py "\$@"
34
34
+
EOF
35
35
+
chmod +x $out/bin/mkbootimg
36
36
+
37
37
+
cat > $out/bin/unpack_bootimg << EOF
38
38
+
#!/bin/sh
39
39
+
export PYTHONPATH="$out/lib/mkbootimg:\$PYTHONPATH"
40
40
+
exec ${python3}/bin/python3 $out/lib/mkbootimg/unpack_bootimg.py "\$@"
41
41
+
EOF
42
42
+
chmod +x $out/bin/unpack_bootimg
43
43
+
44
44
+
cat > $out/bin/repack_bootimg << EOF
45
45
+
#!/bin/sh
46
46
+
export PYTHONPATH="$out/lib/mkbootimg:\$PYTHONPATH"
47
47
+
exec ${python3}/bin/python3 $out/lib/mkbootimg/repack_bootimg.py "\$@"
48
48
+
EOF
49
49
+
chmod +x $out/bin/repack_bootimg
50
50
+
51
51
+
runHook postInstall
52
52
+
'';
53
53
+
54
54
+
meta = with lib; {
55
55
+
description = "Android boot image creation tool from AOSP";
56
56
+
homepage = "https://android.googlesource.com/platform/system/tools/mkbootimg";
57
57
+
license = licenses.asl20;
58
58
+
platforms = platforms.all;
59
59
+
};
60
60
+
}