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