tritonshell/README.md

49 lines
1.7 KiB
Markdown
Raw Normal View History

2022-01-21 16:55:29 +00:00
# tritonshell
2022-02-01 01:58:49 +00:00
### a nix dev & ops shell for [triton](https://www.joyent.com/triton/compute) and [manta](https://www.joyent.com/triton/object-storage)
2022-02-01 00:59:09 +00:00
2022-03-03 11:35:28 +00:00
[![asciicast](https://asciinema.org/a/xz53b9RJURrSZjbM5WGTQWrez.svg)](https://asciinema.org/a/xz53b9RJURrSZjbM5WGTQWrez)
2022-02-01 00:59:09 +00:00
2022-03-03 10:55:56 +00:00
What is the package manager `nix`? For a refresher, [please read on here](https://serokell.io/blog/what-is-nix).
2022-03-03 10:49:00 +00:00
0. If you're already on NixOS and / or have worked with `flakes` before, **jump** to **2.**
1. [**Install** nix, the package manager](https://nixos.org/download.html)
2022-02-01 01:58:49 +00:00
1. Now, make sure you're ready to `nix` with flakes, this should give you
some output:
2022-02-01 00:59:09 +00:00
```
nix flake --help
```
2. Otherwise, proceed to enable flakes (still an experimental feature in
`nix`):
2022-02-01 00:59:09 +00:00
https://nixos.wiki/wiki/Flakes#Installing_flakes
2022-03-03 10:49:00 +00:00
2. **Get** this nix flake template, it will be setup in a new directory
`./tritonshell` (feel free to adjust this):
2022-02-01 00:59:09 +00:00
```
2022-03-03 10:49:00 +00:00
nix flake new --template "git+https://git.greenbaum.cloud/dev/tritonshell?ref=main" ./tritonshell \
&& cd tritonshell
2022-02-01 00:59:09 +00:00
```
2022-03-03 10:49:00 +00:00
3. **Optional**: **Adjust** `./flake.nix` to match domains and data centers of your Triton Data
Center setup. Look for the `CUSTOMIZE` comment.
Greenbaum Cloud users skip
2022-03-03 01:09:28 +00:00
this step, everything's preconfigured.
```
vim ./flake.nix
```
2022-02-01 01:58:49 +00:00
2022-03-03 10:49:00 +00:00
4. **Ready** to go:
2022-02-01 00:59:09 +00:00
```
nix develop
```
2022-02-01 01:58:49 +00:00
**Optional**:
2022-03-03 10:49:00 +00:00
If you'd like to add **additional packages** to your new tritonshell, you
can do so: just edit `flake.nix` and look for `extraDevshellPkgs`. Packages
added here will be pulled from the `nixos-unstable` channel, you can [search
for available packages here](https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=hello).
2022-02-01 01:58:49 +00:00
TODO: add `nix-direnv`