Repository navigation
fix(nixos): auto-detect matic host #2100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -38,6 +38,8 @@ NIX_USER_TRUSTED := $(shell grep -qE "trusted-users.*=.*(\\*|$(shell whoami))" / | |||||||
| NAMED_HOSTS := galactica kyber matic pod viper | ||||||||
| NIXOS_NAMED_HOSTS := $(filter matic viper,$(NAMED_HOSTS)) | ||||||||
| ISO_NAMED_HOSTS := $(filter matic viper,$(NAMED_HOSTS)) | ||||||||
| DMI_SYS_VENDOR ?= $(shell cat /sys/class/dmi/id/sys_vendor 2>/dev/null || true) | ||||||||
| DMI_PRODUCT_NAME ?= $(shell cat /sys/class/dmi/id/product_name 2>/dev/null || true) | ||||||||
|
|
||||||||
| # Nix configuration system | ||||||||
| NIX_SYSTEM := $(shell if [ "$(OS)" = "Darwin" ] && [ "$(ARCH)" = "arm64" ]; then \ | ||||||||
|
|
@@ -106,6 +108,9 @@ DETECTED_HOST := $(shell \ | |||||||
| echo "kyber"; \ | ||||||||
| elif [ "$$hostname" = "matic" ]; then \ | ||||||||
| echo "matic"; \ | ||||||||
| elif [ "$(DMI_SYS_VENDOR)" = "Framework" ] \ | ||||||||
| && echo "$(DMI_PRODUCT_NAME)" | grep -q "Laptop 13.*AMD Ryzen AI 300"; then \ | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer
Suggested change
|
||||||||
| echo "matic"; \ | ||||||||
|
Comment on lines
+111
to
+113
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using |
||||||||
| else \ | ||||||||
| echo ""; \ | ||||||||
| fi; \ | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DMI product-name match is a moving target:
grep -q "Laptop 13.*AMD Ryzen AI 300"matches the current Framework AMD 300 DMI string (Laptop 13 (AMD Ryzen AI 300 Series)), but a future Framework BIOS or SKU rename would silently disable auto-detection —make buildwould still work withHOST=matic, but the auto-detect UX advertised in the README would quietly regress. Consider pinning the exact expected value (or leaving a comment pointing at the source of truth innixos-hardware) so a future mismatch surfaces as an obvious diff rather than a silent behavior change.