diff --git a/home/.chezmoi.toml.tmpl b/home/.chezmoi.toml.tmpl index 5fd8f15..ad19147 100644 --- a/home/.chezmoi.toml.tmpl +++ b/home/.chezmoi.toml.tmpl @@ -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") -}}