From ae2ec14d4606a3cc3fb5be3e930b43977e58a841 Mon Sep 17 00:00:00 2001 From: "Lockszmith (@VAST)" Date: Tue, 11 Mar 2025 15:45:52 -0400 Subject: [PATCH] Add ability to bypass externals with OFFLINE=1 --- _home.macos/.chezmoiexternal.yaml | 6 ++++++ _src.posix/.chezmoiexternal.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/_home.macos/.chezmoiexternal.yaml b/_home.macos/.chezmoiexternal.yaml index af73af5..239f2aa 100644 --- a/_home.macos/.chezmoiexternal.yaml +++ b/_home.macos/.chezmoiexternal.yaml @@ -14,6 +14,8 @@ # executable bool false Add executable_ attribute to file # path string none Path to file in archive +{{- if not (env "OFFLINE") -}} + {{ $defaultRefresh := "168h" -}} {{- $externals := dict -}} @@ -115,3 +117,7 @@ type: "file" url: "https://raw.githubusercontent.com/dandavison/delta/refs/heads/main/themes.gitconfig" refreshPeriod: "{{ $defaultRefresh }}" + +{{- else -}} +# .chezmoiexternal is disabled because OFFLINE env is defined +{{- end -}} diff --git a/_src.posix/.chezmoiexternal.yaml b/_src.posix/.chezmoiexternal.yaml index 2bfc120..ec0bbda 100644 --- a/_src.posix/.chezmoiexternal.yaml +++ b/_src.posix/.chezmoiexternal.yaml @@ -14,6 +14,8 @@ # executable bool false Add executable_ attribute to file # path string none Path to file in archive +{{- if not (env "OFFLINE") -}} + {{ $defaultRefresh := "168h" -}} {{- $externals := dict -}} @@ -118,3 +120,7 @@ url: "https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.appimage" executable: true refreshPeriod: "{{ $defaultRefresh }}" + +{{- else -}} +# .chezmoiexternal is disabled because OFFLINE env is defined +{{- end -}} \ No newline at end of file