Skip to content

Commit

Permalink
doc/start: add use-mkdevos section
Browse files Browse the repository at this point in the history
  • Loading branch information
Pacman99 committed Mar 24, 2021
1 parent 01d4eb2 commit b81f426
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/start/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ In addition, the [binary cache](../../cachix) is added for faster deployment.
- [Make installable ISO](./iso.md)
- [Bootstrap Host](./bootstrapping.md)
- [Already on NixOS](./from-nixos.md)
- [Use mkDevos](./mkDevos.md)


[install-nix]: https://nixos.org/manual/nix/stable/#sect-multi-user-installation
36 changes: 36 additions & 0 deletions doc/start/use-mkdevos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Use mkDevos
You can also use devos as a flake input and get the advantage of using
nix flakes to sync with upstream changes in devos.

To do this you will need the template and nix unstable. Edit your flake.nix to
add devos as an input:
```nix
inputs = {
...
devos.url = "github:divnix/devos";
};
```
then replace the outputs section with this:
```nix
outputs = { self, devos, ... }: devos.lib.mkDevos { inherit self; };
```

Now you can update devos as you would any other flake input:
```sh
nix flake update --update-input devos
```

If you would like to change your directory's structure, you can pass
arguments to `mkDevos` to outline where certain things are. You can take a
look at [evalDevosArgs](../../lib/devos/evalDevosArgs.nix) to learn about
the arguments that it can take.

> ##### Notes:
> - All inputs used in devos must also be added to your flake, due to an
> [issue](https://github.com/NixOS/nix/pull/4641) with the `follows` attribute.
> - Optionally, you can safely delete [lib](../../lib), [tests](../../tests) and
> the [core profile](../../profiles/core)
> - You can append `/community` to the `devos.url` to get access to community modules
> which can be added in [extern](../../extern).
> - To use community profiles, you will have to copy them to your tree
> - If you use this method, you will no longer be able to edit devos internals.

0 comments on commit b81f426

Please sign in to comment.