Switch to appropriate comment style

This commit is contained in:
2024-11-07 19:21:44 -06:00
parent 73304fb474
commit 165639c9cc

View File

@@ -1,5 +1,5 @@
# Detect chassis type (likely: laptop | desktop | container) {{- /* Detect chassis type (likely: laptop | desktop | container) */ -}}
# https://www.freedesktop.org/software/systemd/man/latest/hostnamectl.html#chassis%20%5BTYPE%5D {{- /* https://www.freedesktop.org/software/systemd/man/latest/hostnamectl.html#chassis%20%5BTYPE%5D */ -}}
{{- $chassisType := "desktop" }} {{- $chassisType := "desktop" }}
{{- if eq .chezmoi.os "darwin" }} {{- if eq .chezmoi.os "darwin" }}
{{- if contains "MacBook" (output "sysctl" "-n" "hw.model") }} {{- if contains "MacBook" (output "sysctl" "-n" "hw.model") }}
@@ -13,7 +13,7 @@
{{- $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 }} {{- $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 }}
{{- end }} {{- end }}
# Detect number of CPU cores and threads {{- /* Detect number of CPU cores and threads */ -}}
{{- $cpuCores := 1 }} {{- $cpuCores := 1 }}
{{- $cpuThreads := 1 }} {{- $cpuThreads := 1 }}
{{- if eq .chezmoi.os "darwin" }} {{- if eq .chezmoi.os "darwin" }}
@@ -27,7 +27,7 @@
{{- $cpuThreads = (output "powershell.exe" "-NoProfile" "-NonInteractive" "-Command" "(Get-CimInstance -ClassName 'Win32_Processor').NumberOfLogicalProcessors") | trim | atoi }} {{- $cpuThreads = (output "powershell.exe" "-NoProfile" "-NonInteractive" "-Command" "(Get-CimInstance -ClassName 'Win32_Processor').NumberOfLogicalProcessors") | trim | atoi }}
{{- end -}} {{- end -}}
# Detect if running in WSL {{- /* Detect if running in WSL */ -}}
{{- $wsl := true -}} {{- $wsl := true -}}
{{- if eq .chezmoi.os "linux" -}} {{- if eq .chezmoi.os "linux" -}}
{{- $wsl = (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}} {{- $wsl = (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}}