Skip to content

Commit c25aebd

Browse files
committed
add cross compile inventory tag
1 parent 9d1588f commit c25aebd

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

inventory/core/machines.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ _: {
153153
"docker"
154154
"llm-client"
155155
"password-manager"
156+
"cross-compile"
156157
];
157158
deploy = {
158159
targetHost = "[email protected]";

inventory/tags/cross-compile.nix

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{ pkgs, ... }:
2+
{
3+
# Enable cross-compilation support
4+
nixpkgs.config.allowUnsupportedSystem = true;
5+
6+
# Add cross-compilation toolchains
7+
environment.systemPackages = with pkgs; [
8+
# Cross-compilation tools
9+
qemu
10+
11+
# Build essentials for cross-compilation
12+
binutils-unwrapped
13+
gcc-unwrapped
14+
15+
# Useful for debugging cross-compiled binaries
16+
file
17+
binutils # provides readelf
18+
];
19+
20+
# Enable binfmt for running cross-compiled binaries via QEMU
21+
boot.binfmt.emulatedSystems = [
22+
"aarch64-linux"
23+
"armv7l-linux"
24+
"riscv64-linux"
25+
];
26+
}

0 commit comments

Comments
 (0)