Skip to content

Commit 4fc4a7b

Browse files
authored
Merge pull request #14 from jacobo-doist/work-layer-support
Add work layer extension points
2 parents 2c2c563 + cf96758 commit 4fc4a7b

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

home/.chezmoi.toml.tmpl

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,19 @@ Headless detection - systems that should NOT have GUI packages
7070
{{- end -}}
7171
{{- end }}
7272

73-
{{- /* Work machine vs personal machine */ -}}
74-
{{- $work_hosts := list "nerith" -}}
73+
{{- /* Work machine vs personal machine
74+
Priority: marker file is definitive, then fall back to hostname list */ -}}
7575
{{- $is_work := false -}}
76-
{{- range $work_hosts -}}
77-
{{- if eq . $.chezmoi.hostname -}}
78-
{{- $is_work = true -}}
79-
{{- break -}}
76+
{{- if stat (joinPath .chezmoi.homeDir ".config/chezmoi-work/.is-work") -}}
77+
{{- $is_work = true -}}
78+
{{- else -}}
79+
{{- $work_hosts := list "nerith" -}}
80+
{{- range $work_hosts -}}
81+
{{- if eq . $hostname -}}
82+
{{- $is_work = true -}}
83+
{{- break -}}
8084
{{- end -}}
85+
{{- end -}}
8186
{{- end -}}
8287

8388
{{- /*

home/dot_config/git/config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
path = ~/.config/git/config.delta
88
#path = ~/.config/git/config.diff-so-fancy
99
path = ~/.config/git/config.user
10+
path = ~/.config/git/config.work
1011
path = ~/.config/git/config.local
1112

1213
[init]

home/dot_ssh/config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Managed by chezmoi — do not edit manually
2+
# Local/work SSH config goes in ~/.ssh/config.d/
3+
4+
Include ~/.ssh/config.d/*

home/dot_ssh/config.d/create_local

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Machine-specific SSH config — not managed by chezmoi
2+
# Edit this file directly; chezmoi will not overwrite it.

0 commit comments

Comments
 (0)