Skip to content

Commit 39185ed

Browse files
stirbymatifali
authored andcommitted
dotfiles page done
1 parent 48bdc86 commit 39185ed

File tree

4 files changed

+76
-8
lines changed

4 files changed

+76
-8
lines changed
275 KB
Loading

docs/user-guides/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,10 @@ The following filters are supported:
5858
statuses, see
5959
[WorkspaceStatus documentation](https://pkg.go.dev/github.com/coder/coder/codersdk#WorkspaceStatus).
6060

61-
6261
## Updating workspaces
6362

6463
After updating the default version of the template that a workspace was created
65-
from, you can update the workspace.
64+
from, you can update the workspace.
6665

6766
![Updating a workspace](../../images/workspace-update.png)
6867

@@ -87,10 +86,9 @@ manually updated the workspace.
8786

8887
![Automatic Updates](./images/workspace-automatic-updates.png)
8988

90-
9189
### Update policies
9290

93-
Template admins can require workspaces be on the latest version before starting. When this is enabled, you will be presented with an "Update and Start" button in the UI. Workspaces that start on connect will automatically update on the first out-of-date connection.
91+
Template admins can require workspaces be on the latest version before starting. When this is enabled, you will be presented with an "Update and Start" button in the UI. Workspaces that start on connect will automatically update on the first out-of-date connection.
9492

9593
## Bulk operations (enterprise)
9694

Lines changed: 72 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,74 @@
1-
# Personalize your workspace
1+
# Dotfiles
22

3-
TODO:
3+
<!-- markdown-link-check-disable -->
44

5-
- dotfiles
6-
- idk
5+
Coder offers the `coder dotfiles <repo>` command which simplifies workspace
6+
personalization. Our behavior is consistent with Codespaces, so
7+
[their documentation](https://docs.github.com/en/codespaces/customizing-your-codespace/personalizing-codespaces-for-your-account#dotfiles)
8+
explains how it loads your repo.
9+
10+
<!-- markdown-link-check-enable -->
11+
12+
You can read more on dotfiles best practices [here](https://dotfiles.github.io).
13+
14+
## From templates
15+
16+
Templates can prompt users for their dotfiles repo URL, which will personalize
17+
your workspace automatically.
18+
19+
![Dotfiles in workspace creation](../images/user-guides/dotfiles-module.png)
20+
21+
<!-- TODO: Template management docs link-->
22+
23+
> Template admins: this can be enabled quite easily with a our
24+
> [dotfiles module](https://registry.coder.com/modules/dotfiles) using just a
25+
> few lines in the template.
26+
27+
## Personalize script
28+
29+
Templates may be configured to support executing a `~/personalize` script on
30+
startup which users can populate with commands to customize their workspaces.
31+
32+
You can even fill `personalize` with `coder dotfiles <repo>`, but those looking
33+
for a simpler approach can inline commands like so:
34+
35+
```bash
36+
#!/bin/bash
37+
sudo apt update
38+
# Install some of my favorite tools every time my workspace boots
39+
sudo apt install -y neovim fish cargo
40+
```
41+
42+
<!-- TODO: template admin docs link -->
43+
44+
> Template admins: read the docs on how to enable the `~/personalize` script on
45+
> templates.
46+
47+
## Setup script support
48+
49+
User can setup their dotfiles by creating one of the following script files in
50+
their dotfiles repo:
51+
52+
- `install.sh`
53+
- `install`
54+
- `bootstrap.sh`
55+
- `bootstrap`
56+
- `script/bootstrap`
57+
- `setup.sh`
58+
- `setup`
59+
- `script/setup`
60+
61+
If any of the above files are found (in the specified order), Coder will try to
62+
execute the first match. After the first match is found, other files will be
63+
ignored.
64+
65+
The setup script must be executable, otherwise the dotfiles setup will fail. If
66+
you encounter this issue, you can fix it by making the script executable using
67+
the following commands:
68+
69+
```shell
70+
cd <path_to_dotfiles_repo>
71+
chmod +x <script_name>
72+
git commit -m "Make <script_name> executable" <script_name>
73+
git push
74+
```

docs/user-guides/workspace-scheduling.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,7 @@ Enterprise admins may also configure failure cleanup, which will autmatically
111111
delete workspaces that remain in a `failed` state for too long.
112112

113113
## Next steps
114+
114115
<!-- TODO: Links -->
116+
115117
- Template Scheduling

0 commit comments

Comments
 (0)