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": {
"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": {
"locked": {
"lastModified": 1767047869,
@@ -18,8 +36,24 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"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",

View File

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