diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl index 2d4a71e..4f8e2c7 100644 --- a/.chezmoi.toml.tmpl +++ b/.chezmoi.toml.tmpl @@ -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 }} diff --git a/.chezmoiscripts/run_init.sh.tmpl b/.chezmoiscripts/run_init.sh.tmpl index 9f1dc0f..d74d340 100755 --- a/.chezmoiscripts/run_init.sh.tmpl +++ b/.chezmoiscripts/run_init.sh.tmpl @@ -7,6 +7,7 @@ cd "$CHEZMOI_SOURCE_DIR" #CZ_MODEL="$(ioreg -l | grep "product-name" | sed -Ee 's/^.*\<"(.*)\"\>.*$/\1/')" set | grep '^CZ_' printf 'System detected as %s/%s, setting up .chezmoiroot and initializing...\n' "$CZ_SYS" "$CZ_CHASSIS" +set -x if [ -r "base.chezmoiroot.$CZ_SYS.$CZ_CHASSIS" ]; then ln -s "base.chezmoiroot.$CZ_SYS.$CZ_CHASSIS" .chezmoiroot elif [ -r "base.chezmoiroot.$CZ_SYS" ]; then diff --git a/_src.posix/.chezmoi.toml.tmpl b/_src.posix/.chezmoi.toml.tmpl index 031b1d0..95e69e6 100644 --- a/_src.posix/.chezmoi.toml.tmpl +++ b/_src.posix/.chezmoi.toml.tmpl @@ -26,7 +26,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" }} {{- $sysVendor = "pc" }} diff --git a/symclone.sh b/symclone.sh index a5e6cfe..c762bb8 100755 --- a/symclone.sh +++ b/symclone.sh @@ -32,7 +32,7 @@ fi mkdir -p "$DEST_DIR" # Find all directories and recreate them in the destination -find "$SRC_DIR" -type d -mindepth 1 | while read -r dir; do +find "$SRC_DIR" -mindepth 1 -type d | while read -r dir; do mkdir -p "$DEST_DIR/${dir#$SRC_DIR/}" done