2021-02-14 02:38:20 +00:00
|
|
|
# Quick Start
|
2023-01-28 20:49:10 +00:00
|
|
|
|
2021-02-14 02:38:20 +00:00
|
|
|
The only dependency is nix, so make sure you have it [installed][install-nix].
|
|
|
|
|
|
|
|
## Get the Template
|
2023-01-28 20:49:10 +00:00
|
|
|
|
2022-08-13 19:34:46 +00:00
|
|
|
If you currently don't have flakes setup, you can utilize the digga shell to pull the template:
|
2023-01-28 20:49:10 +00:00
|
|
|
|
2021-02-14 02:38:20 +00:00
|
|
|
```sh
|
2022-08-13 19:34:46 +00:00
|
|
|
nix-shell "https://github.com/divnix/digga/archive/main.tar.gz" \
|
|
|
|
--run "nix flake init -t github:divnix/digga"
|
|
|
|
```
|
2023-01-28 20:49:10 +00:00
|
|
|
|
2022-08-13 19:34:46 +00:00
|
|
|
If you already have flakes support, you can directly pull the template:
|
2023-01-28 20:49:10 +00:00
|
|
|
|
2022-08-13 19:34:46 +00:00
|
|
|
```sh
|
|
|
|
nix flake init -t github:divnix/digga
|
|
|
|
```
|
2021-02-14 02:38:20 +00:00
|
|
|
|
2022-08-13 19:34:46 +00:00
|
|
|
Then make sure to create the git repository:
|
2023-01-28 20:49:10 +00:00
|
|
|
|
2022-08-13 19:34:46 +00:00
|
|
|
```sh
|
2021-02-14 02:38:20 +00:00
|
|
|
git init
|
|
|
|
git add .
|
|
|
|
git commit -m init
|
|
|
|
```
|
|
|
|
|
2022-08-13 19:34:46 +00:00
|
|
|
To drop into a nix-shell, if you don't have flakes setup, use the digga shell to create a `flake.lock`:
|
2023-01-28 20:49:10 +00:00
|
|
|
|
2022-08-13 19:34:46 +00:00
|
|
|
```sh
|
|
|
|
nix-shell "https://github.com/divnix/digga/archive/main.tar.gz" \
|
|
|
|
--run "nix flake lock"
|
|
|
|
```
|
2023-01-28 20:49:10 +00:00
|
|
|
|
2022-08-13 19:34:46 +00:00
|
|
|
Or if you do have flakes support, just run:
|
2023-01-28 20:49:10 +00:00
|
|
|
|
2022-08-13 19:34:46 +00:00
|
|
|
```sh
|
|
|
|
nix flake lock
|
|
|
|
```
|
|
|
|
|
|
|
|
Finally, run `nix-shell` to get to an interactive shell with all the dependencies, including the unstable nix
|
|
|
|
version required. You can run `menu` to confirm that you are using digga (expected output includes [docs], [general commands], [linter], etc.).
|
2021-02-14 02:38:20 +00:00
|
|
|
|
2021-04-19 02:26:27 +00:00
|
|
|
In addition, the [binary cache](../integrations/cachix.md) is added for faster deployment.
|
2021-02-14 02:38:20 +00:00
|
|
|
|
|
|
|
> ##### _Notes:_
|
2023-01-28 20:49:10 +00:00
|
|
|
>
|
2021-02-14 02:38:20 +00:00
|
|
|
> - Flakes ignore files that have not been added to git, so be sure to stage new
|
|
|
|
> files before building the system.
|
2021-02-17 21:15:43 +00:00
|
|
|
> - You can choose to simply clone the repo with git if you want to follow
|
|
|
|
> upstream changes.
|
2021-05-24 08:28:52 +00:00
|
|
|
> - If the `nix-shell -p cachix --run "cachix use nrdxp"` line doesn't work
|
|
|
|
> you can try with sudo: `sudo nix-shell -p cachix --run "cachix use nrdxp"`
|
2021-02-14 02:38:20 +00:00
|
|
|
|
|
|
|
## Next Steps:
|
2022-08-13 19:34:46 +00:00
|
|
|
|
2021-02-14 02:38:20 +00:00
|
|
|
- [Make installable ISO](./iso.md)
|
|
|
|
|
|
|
|
[install-nix]: https://nixos.org/manual/nix/stable/#sect-multi-user-installation
|