fix: multi arch flake

This commit is contained in:
2026-01-17 13:53:11 -05:00
parent 89f2114b06
commit 5e8ac5e4b6
3 changed files with 73 additions and 26 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

34
flake.lock generated
View File

@@ -1,5 +1,23 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1767047869, "lastModified": 1767047869,
@@ -18,8 +36,24 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@@ -1,37 +1,49 @@
{ {
description = "ARM cross-compilation environment"; description = "Development Environment";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = outputs =
{ self, nixpkgs }: { self
let , nixpkgs
system = "x86_64-linux"; , flake-utils
pkgs = nixpkgs.legacyPackages.${system}; ,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = (
import nixpkgs {
system = system;
config.allowUnfree = true;
}
);
oc = pkgs.writeShellScriptBin "oc" '' oc = pkgs.writeShellScriptBin "oc" ''
PRJ_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) PRJ_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
cd "$PRJ_ROOT" && OPENCODE_EXPERIMENTAL_LSP_TOOL=true opencode cd "$PRJ_ROOT" && OPENCODE_EXPERIMENTAL_LSP_TOOL=true opencode
''; '';
in in
{ {
devShells.${system}.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ packages = with pkgs; [
# Backend # Backend
go go
gopls gopls
golangci-lint golangci-lint
# Frontend # Frontend
bun bun
watchman watchman
tailwindcss_4 tailwindcss_4
# Custom Commands # Custom Commands
oc oc
]; ];
}; };
}; }
);
} }