Skip to content

Commit 0001114

Browse files
authored
Add Fleek + Git push/pull to devbox global docs (#1121)
1 parent 85f832e commit 0001114

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

docs/app/docs/devbox_global.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Use Devbox as your Primary Package Manager
3+
description: Install packages and tools system wide with Devbox Global
34
---
45

56
In addition to managing isolated development environments, you can use Devbox as a general package manager. Devbox Global allows you to add packages to a global `devbox.json.` This is useful for installing a standard set of tools you want to use across multiple Devbox Projects.
@@ -17,6 +18,7 @@ You can also use `devbox global` to replace package managers like `brew` and `ap
1718

1819
Devbox saves your global config in a `devbox.json` file in your home directory. This file can be shared with other users or checked into source control to synchronize it across machines.
1920

21+
2022
## Adding and Managing Global Packages
2123

2224
You can install a package using `devbox global add [<package>]`, where the package names should be a list of [Nix Packages](https://search.nixos.org/packages) you want to install.
@@ -54,16 +56,29 @@ devbox global remove ripgrep
5456
ripgrep was removed
5557
```
5658

59+
## Using Fleek with Devbox Global
60+
61+
[Fleek](https://getfleek.dev/) provides a nicely tuned set of packages and configuration for common tools that is compatible with Devbox Global. Configurations are provided at different [levels of bling](https://getfleek.dev/docs/bling), with higher levels adding more packages and opinionated configuration.
62+
63+
To install a Fleek profile, you can use `devbox global pull <fleek-url>`, where the Fleek URL indicates the profile you want to install. For example, to install the `high` bling profile, you can run:
64+
65+
```bash
66+
devbox global pull https://devbox.getfleek.dev/high
67+
```
68+
69+
Fleek profiles also provide a few convenience scripts to automate setting up your profile. You can view the full list of scripts using `devbox global run` with no arguments
70+
71+
For more information, see the [Fleek for Devbox Docs](https://getfleek.dev/docs/devbox)
72+
5773
## Using Global Packages in your Host Shell
5874

5975
If you want to make your global packages available in your host shell, you can add them to your shell PATH. Running `devbox global shellenv` will print the command necessary to source the packages.
6076

61-
6277
### Add Global Packages to your current Host Shell
6378
To temporarily add the global packages to your current shell, run:
6479

6580
```bash
66-
. <(devbox global shellenv)
81+
. <(devbox global shellenv --init-hook)
6782
```
6883

6984
You can also add a hook to your shell's config to make them available whenever you launch your shell:
@@ -73,7 +88,7 @@ You can also add a hook to your shell's config to make them available whenever y
7388
Add the following command to your `~/.bashrc` file:
7489

7590
```bash
76-
eval "$(devbox global shellenv)"
91+
eval "$(devbox global shellenv --init-hook)"
7792
```
7893

7994
Make sure to add this hook before any other hooks that use your global packages.
@@ -82,33 +97,22 @@ Make sure to add this hook before any other hooks that use your global packages.
8297
Add the following command to your `~/.zshrc` file:
8398

8499
```bash
85-
eval "$(devbox global shellenv)"
100+
eval "$(devbox global shellenv --init-hook)"
86101
```
87102

88103
### Fish
89104

90105
Add the following command to your `~/.config/fish/config.fish` file:
91106

92107
```bash
93-
devbox global shellenv | source
108+
devbox global shellenv --init-hook | source
94109
```
95110

111+
## Sharing Your Global Config with Git
96112

97-
## Sharing Your Global Config
98-
99-
Your global `devbox.json` will be stored in `$XDG_DATA_HOME/devbox/global/default/devbox.json`. If `$XDG_DATA_HOME` is not set, it will default to `~/.local/share/devbox/global/default/devbox.json`.
100-
101-
If you want to share your configuration with across machines or with other users, you can copy this file to a git repository or host it online. You can then download and set the config as your global profile using `devbox global pull <path> | <url>`.
102-
103-
```bash
104-
# Load the global config from a file
105-
106-
devbox global pull /path/to/devbox.json
113+
You can use Git to synchronize your `devbox global` config across multiple machines using `devbox global push <remote>` and `devbox global pull <remote>`.
107114

108-
# Load the global config from a github repo
109-
110-
devbox global pull https://raw.githubusercontent.com/org/repo/branch/path/to/devbox.json
111-
```
115+
Your global `devbox.json` and any other files in the Git remote will be stored in `$XDG_DATA_HOME/devbox/global/default`. If `$XDG_DATA_HOME` is not set, it will default to `~/.local/share/devbox/global/default`. You can view the current global directory by running `devbox global path`.
112116

113117
## Next Steps
114118

@@ -118,6 +122,7 @@ devbox global pull https://raw.githubusercontent.com/org/repo/branch/path/to/dev
118122
* **[Devbox Scripts](guides/scripts.md):** Automate setup steps and configuration for your shell using Devbox Scripts.
119123
* **[Configuration Guide](configuration.md):** Learn how to configure your shell and dev environment with `devbox.json`.
120124
* **[Browse Examples](https://github.com/jetpack-io/devbox-examples):** You can see how to create a development environment for your favorite tools or languages by browsing the Devbox Examples repo.
125+
* **[Using Flakes with Devbox](guides/using_flakes.md):** Learn how to install packages from Nix Flakes.
121126

122127
### Use Devbox with your IDE
123128

0 commit comments

Comments
 (0)