From 4188b9f82a8fcea7536d59e6dce89bba0725ccdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Tue, 29 Oct 2024 13:44:27 +0100 Subject: [PATCH] cross compile certain packages to riscv --- machine/vf2/cross-packages.nix | 18 ++++++++++++++++++ machine/vf2/default.nix | 1 + 2 files changed, 19 insertions(+) create mode 100644 machine/vf2/cross-packages.nix diff --git a/machine/vf2/cross-packages.nix b/machine/vf2/cross-packages.nix new file mode 100644 index 00000000..fdb3a1d9 --- /dev/null +++ b/machine/vf2/cross-packages.nix @@ -0,0 +1,18 @@ +# Cross compiled packages for when shit breaks +{ + nixpkgs, + lix, + ... +}: let + pkgs_x86_64 = import nixpkgs { + system = "x86_64-linux"; + crossSystem.system = "riscv64-linux"; + overlays = [lix.overlays.default]; + }; +in { + nixpkgs.overlays = [ + (self: super: { + inherit (pkgs_x86_64) lix nixos-option; + }) + ]; +} diff --git a/machine/vf2/default.nix b/machine/vf2/default.nix index 8b1d841f..5175ad29 100644 --- a/machine/vf2/default.nix +++ b/machine/vf2/default.nix @@ -7,6 +7,7 @@ "${nixos-config}/config" ./disko.nix ./hardware.nix + ./cross-packages.nix ]; system.stateVersion = "24.11"; }