Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1e60729
feat: add macOS compatibility while maintaining Linux functionality
kennethdsheridan Jul 26, 2025
870b1f0
fix: resolve macOS compatibility issues and improve hardware detection
kennethdsheridan Jul 26, 2025
da99610
feat: generate both JSON and TOML output files
kennethdsheridan Jul 26, 2025
119e6c7
implement Ports & Adapters architecture foundation
kennethdsheridan Jul 26, 2025
1e02e9d
fix: resolve Nix build compatibility issues
kennethdsheridan Jul 26, 2025
07dfec5
fix: resolve macOS CPU core parsing test failure
kennethdsheridan Jul 26, 2025
238baed
fix: make command executor tests compatible with Nix sandbox
kennethdsheridan Jul 26, 2025
3597860
fix: correct doctest examples for create_service function
kennethdsheridan Jul 26, 2025
ccfe905
feat: enhance macOS network device information collection
kennethdsheridan Jul 26, 2025
545d1da
fix: apply cargo fmt formatting corrections
kennethdsheridan Jul 26, 2025
05eae10
fix: remove unused imports and variables
kennethdsheridan Jul 26, 2025
cf40114
fix: apply final cargo fmt corrections
kennethdsheridan Jul 26, 2025
fe5a65e
fix: resolve all clippy warnings
kennethdsheridan Jul 26, 2025
c32cf7a
fix: apply final cargo fmt adjustments
kennethdsheridan Jul 26, 2025
4f23c4b
fix: resolve all remaining clippy warnings (88 total)
kennethdsheridan Jul 26, 2025
8649a52
fix: resolve cargo fmt formatting issues for CI compliance
kennethdsheridan Jul 27, 2025
caf20e8
fix: resolve all remaining uninlined format args clippy warnings
kennethdsheridan Jul 27, 2025
4b7309f
fix: resolve remaining format string warnings in binary
kennethdsheridan Jul 27, 2025
16635f6
fix: resolve final format string warning in NUMA distance output
kennethdsheridan Jul 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .direnv/bin/nix-direnv-reload
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -e
if [[ ! -d "/Users/kennysheridan/Library/CloudStorage/OneDrive-Personal/Documents/san_francisco_compute_company/hardware_report" ]]; then
echo "Cannot find source directory; Did you move it?"
echo "(Looking for "/Users/kennysheridan/Library/CloudStorage/OneDrive-Personal/Documents/san_francisco_compute_company/hardware_report")"
echo 'Cannot force reload with this script - use "direnv reload" manually and then try again'
exit 1
fi

# rebuild the cache forcefully
_nix_direnv_force_reload=1 direnv exec "/Users/kennysheridan/Library/CloudStorage/OneDrive-Personal/Documents/san_francisco_compute_company/hardware_report" true

# Update the mtime for .envrc.
# This will cause direnv to reload again - but without re-building.
touch "/Users/kennysheridan/Library/CloudStorage/OneDrive-Personal/Documents/san_francisco_compute_company/hardware_report/.envrc"

# Also update the timestamp of whatever profile_rc we have.
# This makes sure that we know we are up to date.
touch -r "/Users/kennysheridan/Library/CloudStorage/OneDrive-Personal/Documents/san_francisco_compute_company/hardware_report/.envrc" "/Users/kennysheridan/Library/CloudStorage/OneDrive-Personal/Documents/san_francisco_compute_company/hardware_report/.direnv"/*.rc
2,159 changes: 2,159 additions & 0 deletions .direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ regex = "1.11.1"
toml = "0.8.19"
libc = "0.2.161"
tokio = { version = "1.0", features = ["full"] }
async-trait = "0.1"

[dev-dependencies]
tempfile = "3.8" # For temporary file handling in tests
Expand Down
180 changes: 180 additions & 0 deletions MYQQGPTJ6J_hardware_report.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"summary": {
"system_info": {
"uuid": "53040FFD-5BCE-5B29-A887-2B7EEA02A0EE",
"serial": "MYQQGPTJ6J",
"product_name": "MacBook Pro (Apple M4 Max)",
"product_manufacturer": "Apple Inc."
},
"total_memory": "64.0G",
"memory_config": "LPDDR5 @ Integrated",
"total_storage": "2.0 TB",
"total_storage_tb": 1.81464035063982,
"filesystems": [
"/dev/disk3s1s1 (apfs) - 1.9T total, 262G used, 1.6T available, mounted on /",
"/dev/disk3s6 (apfs) - 1.9T total, 262G used, 1.6T available, mounted on /System/Volumes/VM",
"/dev/disk3s2 (apfs) - 1.9T total, 262G used, 1.6T available, mounted on /System/Volumes/Preboot",
"/dev/disk3s4 (apfs) - 1.9T total, 262G used, 1.6T available, mounted on /System/Volumes/Update",
"/dev/disk1s2 (apfs) - 500M total, 19M used, 482M available, mounted on /System/Volumes/xarts",
"/dev/disk1s1 (apfs) - 500M total, 19M used, 482M available, mounted on /System/Volumes/iSCPreboot",
"/dev/disk1s3 (apfs) - 500M total, 19M used, 482M available, mounted on /System/Volumes/Hardware",
"/dev/disk3s7 (apfs) - 1.9T total, 262G used, 1.6T available, mounted on /nix"
],
"bios": {
"vendor": "Apple Inc.",
"version": "11881.121.1",
"release_date": "N/A",
"firmware_version": "11881.121.1"
},
"chassis": {
"manufacturer": "Apple Inc.",
"type_": "Laptop",
"serial": "MYQQGPTJ6J"
},
"motherboard": {
"manufacturer": "Apple Inc.",
"product_name": "Mac16,5",
"version": "11881.121.1",
"serial": "MYQQGPTJ6J",
"features": "Integrated",
"location": "System Board",
"type_": "Motherboard"
},
"total_gpus": 1,
"total_nics": 6,
"numa_topology": {},
"cpu_topology": {
"total_cores": 16,
"total_threads": 16,
"sockets": 1,
"cores_per_socket": 16,
"threads_per_core": 1,
"numa_nodes": 1,
"cpu_model": "Apple M4 Max"
},
"cpu_summary": "Apple M4 Max (1 Socket, 16 Cores/Socket, 1 Thread/Core, 1 NUMA Node)"
},
"hostname": "Kennys-MacBook-Pro.local",
"fqdn": "Kennys-MacBook-Pro.local",
"os_ip": [],
"bmc_ip": null,
"bmc_mac": null,
"hardware": {
"cpu": {
"model": "Apple M4 Max",
"cores": 16,
"threads": 1,
"sockets": 1,
"speed": "Unknown"
},
"memory": {
"total": "64.0G",
"type_": "LPDDR5",
"speed": "Integrated",
"modules": [
{
"size": "64.0G",
"type_": "LPDDR5",
"speed": "Integrated",
"location": "System Memory",
"manufacturer": "Micron",
"serial": "N/A"
}
]
},
"storage": {
"devices": [
{
"name": "APPLE SSD AP2048Z",
"type_": "ssd",
"size": "2 TB (1,995,218,165,760 bytes)",
"model": "APPLE SSD AP2048Z (Apple Fabric)"
}
]
},
"gpus": {
"devices": [
{
"index": 0,
"name": "Apple M4 Max (Metal 3)",
"uuid": "macOS-GPU-0",
"memory": "Unified Memory (40 cores)",
"pci_id": "Apple Fabric (Integrated)",
"vendor": "Apple",
"numa_node": null
}
]
}
},
"network": {
"interfaces": [
{
"name": "en4",
"mac": "56",
"ip": "Unknown",
"speed": "1000 Mbps",
"type_": "Ethernet",
"vendor": "Apple",
"model": "Ethernet",
"pci_id": "Apple Fabric (Integrated)",
"numa_node": null
},
{
"name": "en5",
"mac": "56",
"ip": "Unknown",
"speed": "1000 Mbps",
"type_": "Ethernet",
"vendor": "Apple",
"model": "Ethernet",
"pci_id": "Apple Fabric (Integrated)",
"numa_node": null
},
{
"name": "en6",
"mac": "56",
"ip": "Unknown",
"speed": "1000 Mbps",
"type_": "Ethernet",
"vendor": "Apple",
"model": "Ethernet",
"pci_id": "Apple Fabric (Integrated)",
"numa_node": null
},
{
"name": "bridge0",
"mac": "Unknown",
"ip": "Unknown",
"speed": "1000 Mbps",
"type_": "Ethernet",
"vendor": "Apple",
"model": "Ethernet",
"pci_id": "Apple Fabric (Integrated)",
"numa_node": null
},
{
"name": "en0",
"mac": "84",
"ip": "192.168.1.90",
"speed": "1200 Mbps",
"type_": "AirPort",
"vendor": "Apple",
"model": "Wi-Fi 802.11 a/b/g/n/ac/ax",
"pci_id": "Apple Fabric (Integrated)",
"numa_node": null
},
{
"name": "utun4",
"mac": "Unknown",
"ip": "100.84.190.125",
"speed": null,
"type_": "VPN (io.tailscale.ipn.macos)",
"vendor": "Unknown",
"model": "Unknown",
"pci_id": "Unknown",
"numa_node": null
}
],
"infiniband": null
}
}
152 changes: 152 additions & 0 deletions MYQQGPTJ6J_hardware_report.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
hostname = "Kennys-MacBook-Pro.local"
fqdn = "Kennys-MacBook-Pro.local"
os_ip = []

[summary]
total_memory = "64.0G"
memory_config = "LPDDR5 @ Integrated"
total_storage = "2.0 TB"
total_storage_tb = 1.81464035063982
filesystems = [
"/dev/disk3s1s1 (apfs) - 1.9T total, 262G used, 1.6T available, mounted on /",
"/dev/disk3s6 (apfs) - 1.9T total, 262G used, 1.6T available, mounted on /System/Volumes/VM",
"/dev/disk3s2 (apfs) - 1.9T total, 262G used, 1.6T available, mounted on /System/Volumes/Preboot",
"/dev/disk3s4 (apfs) - 1.9T total, 262G used, 1.6T available, mounted on /System/Volumes/Update",
"/dev/disk1s2 (apfs) - 500M total, 19M used, 482M available, mounted on /System/Volumes/xarts",
"/dev/disk1s1 (apfs) - 500M total, 19M used, 482M available, mounted on /System/Volumes/iSCPreboot",
"/dev/disk1s3 (apfs) - 500M total, 19M used, 482M available, mounted on /System/Volumes/Hardware",
"/dev/disk3s7 (apfs) - 1.9T total, 262G used, 1.6T available, mounted on /nix",
]
total_gpus = 1
total_nics = 6
cpu_summary = "Apple M4 Max (1 Socket, 16 Cores/Socket, 1 Thread/Core, 1 NUMA Node)"

[summary.system_info]
uuid = "53040FFD-5BCE-5B29-A887-2B7EEA02A0EE"
serial = "MYQQGPTJ6J"
product_name = "MacBook Pro (Apple M4 Max)"
product_manufacturer = "Apple Inc."

[summary.bios]
vendor = "Apple Inc."
version = "11881.121.1"
release_date = "N/A"
firmware_version = "11881.121.1"

[summary.chassis]
manufacturer = "Apple Inc."
type_ = "Laptop"
serial = "MYQQGPTJ6J"

[summary.motherboard]
manufacturer = "Apple Inc."
product_name = "Mac16,5"
version = "11881.121.1"
serial = "MYQQGPTJ6J"
features = "Integrated"
location = "System Board"
type_ = "Motherboard"

[summary.numa_topology]

[summary.cpu_topology]
total_cores = 16
total_threads = 16
sockets = 1
cores_per_socket = 16
threads_per_core = 1
numa_nodes = 1
cpu_model = "Apple M4 Max"

[hardware.cpu]
model = "Apple M4 Max"
cores = 16
threads = 1
sockets = 1
speed = "Unknown"

[hardware.memory]
total = "64.0G"
type_ = "LPDDR5"
speed = "Integrated"

[[hardware.memory.modules]]
size = "64.0G"
type_ = "LPDDR5"
speed = "Integrated"
location = "System Memory"
manufacturer = "Micron"
serial = "N/A"

[[hardware.storage.devices]]
name = "APPLE SSD AP2048Z"
type_ = "ssd"
size = "2 TB (1,995,218,165,760 bytes)"
model = "APPLE SSD AP2048Z (Apple Fabric)"

[[hardware.gpus.devices]]
index = 0
name = "Apple M4 Max (Metal 3)"
uuid = "macOS-GPU-0"
memory = "Unified Memory (40 cores)"
pci_id = "Apple Fabric (Integrated)"
vendor = "Apple"

[[network.interfaces]]
name = "en4"
mac = "56"
ip = "Unknown"
speed = "1000 Mbps"
type_ = "Ethernet"
vendor = "Apple"
model = "Ethernet"
pci_id = "Apple Fabric (Integrated)"

[[network.interfaces]]
name = "en5"
mac = "56"
ip = "Unknown"
speed = "1000 Mbps"
type_ = "Ethernet"
vendor = "Apple"
model = "Ethernet"
pci_id = "Apple Fabric (Integrated)"

[[network.interfaces]]
name = "en6"
mac = "56"
ip = "Unknown"
speed = "1000 Mbps"
type_ = "Ethernet"
vendor = "Apple"
model = "Ethernet"
pci_id = "Apple Fabric (Integrated)"

[[network.interfaces]]
name = "bridge0"
mac = "Unknown"
ip = "Unknown"
speed = "1000 Mbps"
type_ = "Ethernet"
vendor = "Apple"
model = "Ethernet"
pci_id = "Apple Fabric (Integrated)"

[[network.interfaces]]
name = "en0"
mac = "84"
ip = "192.168.1.90"
speed = "1200 Mbps"
type_ = "AirPort"
vendor = "Apple"
model = "Wi-Fi 802.11 a/b/g/n/ac/ax"
pci_id = "Apple Fabric (Integrated)"

[[network.interfaces]]
name = "utun4"
mac = "Unknown"
ip = "100.84.190.125"
type_ = "VPN (io.tailscale.ipn.macos)"
vendor = "Unknown"
model = "Unknown"
pci_id = "Unknown"
Loading
Loading