Skip to content

Commit cf1ae85

Browse files
authored
Bundle rcrc with personal setup feature (#10)
This helps me get rid of the slightly confusing tag structure in my dotfiles by moving `rcrc` files out of being managed by RCM.
1 parent 6d19ab8 commit cf1ae85

6 files changed

Lines changed: 21 additions & 5 deletions

File tree

src/personal-setup/NOTES.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ I've previously (ab)used the _Dev Containers_ extension's built in dotfiles supp
1212
This feature:
1313
- Installs a set of packages in the container (including `rcm` for dotfiles management)
1414
- Mounts my dotfiles repositories into the container
15-
- Installs the dotfiles (with appropriate tags)
15+
- Copies in an `rcrc` for dotfiles configuration, including:
16+
- setting the correct tags and dotfiles mount locations
17+
- avoiding setting up git config (as VS Code will copy it into the container anyway with
18+
modifications, which would modify our canonical dotfiles version with transient,
19+
container-specific setup)
20+
- Installs the dotfiles
1621

1722
This feature is intended to be configured as part of my personal user settings as a default feature
1823
for all devcontainers (through `dev.containers.defaultFeatures`). It's obviously specific to me,

src/personal-setup/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Sets up my desired software and configuration for any devcontainer environment.
77

88
```json
99
"features": {
10-
"ghcr.io/csutter/devcontainer-features/personal-setup:1": {}
10+
"ghcr.io/csutter/devcontainer-features/personal-setup:2": {}
1111
}
1212
```
1313

@@ -27,7 +27,12 @@ I've previously (ab)used the _Dev Containers_ extension's built in dotfiles supp
2727
This feature:
2828
- Installs a set of packages in the container (including `rcm` for dotfiles management)
2929
- Mounts my dotfiles repositories into the container
30-
- Installs the dotfiles (with appropriate tags)
30+
- Copies in an `rcrc` for dotfiles configuration, including:
31+
- setting the correct tags and dotfiles mount locations
32+
- avoiding setting up git config (as VS Code will copy it into the container anyway with
33+
modifications, which would modify our canonical dotfiles version with transient,
34+
container-specific setup)
35+
- Installs the dotfiles
3136

3237
This feature is intended to be configured as part of my personal user settings as a default feature
3338
for all devcontainers (through `dev.containers.defaultFeatures`). It's obviously specific to me,

src/personal-setup/devcontainer-feature.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "personal-setup",
3-
"version": "1.4.0",
3+
"version": "2.0.0",
44
"name": "Personal Setup",
55
"description": "Sets up my desired software and configuration for any devcontainer environment.",
66
"mounts": [
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"containerEnv": {
19-
"RCRC": "/mnt/dotfiles/tag-devcontainer/rcrc",
19+
"RCRC": "/etc/rcrc",
2020
"_IS_DEVCONTAINER": "true"
2121
},
2222
"postCreateCommand": "rcup -vf"

src/personal-setup/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ case "$ID" in
2323
exit 1
2424
;;
2525
esac
26+
27+
cp rcrc /etc/rcrc

src/personal-setup/rcrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
EXCLUDES="*.md config/git/config"
2+
TAGS="devcontainer"
3+
DOTFILES_DIRS="/mnt/dotfiles /mnt/dotfiles-private"

test/personal-setup/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ check "tree is available" bash -c "which tree"
1010
check "ssh is available" bash -c "which ssh"
1111
# Use a dotfile that should _always_ be present on any system
1212
check "dotfiles are installed" bash -c "test -f $HOME/.config/fish/config.fish"
13+
check "rcrc is present" bash -c "test -f /etc/rcrc"
1314
check "_IS_DEVCONTAINER is set" bash -c "test \"\$_IS_DEVCONTAINER\" = \"true\""
1415

1516
reportResults

0 commit comments

Comments
 (0)