Fix init process - reducing assumptions

This commit is contained in:
Lockszmith (@crater) 2025-03-12 14:17:55 +00:00
parent 9a15113955
commit 6c93527142
4 changed files with 6 additions and 3 deletions

View file

@ -15,7 +15,8 @@
{{- $chassisType = "desktop" }}
{{- end }}
{{- else if eq .chezmoi.os "linux" }}
{{- $chassisType = (output "hostnamectl" "--json=short" | mustFromJson).Chassis }}
# $chassisType = (output "hostnamectl" "--json=short" | mustFromJson).Chassis }}
{{- $chassisType = "server" }}
{{- else if eq .chezmoi.os "windows" }}
{{- $sysType = "windows" }}
{{- $chassisType = (output "powershell.exe" "-NoProfile" "-NonInteractive" "-Command" "if ((Get-CimInstance -Class Win32_Battery | Measure-Object).Count -gt 0) { Write-Output 'laptop' } else { Write-Output 'desktop' }") | trim }}