Skip to content

Commit

Permalink
docs: update to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
woile committed Jun 26, 2023
1 parent 1a3b864 commit e74a33a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ See [the template](./template/default/flake.nix).

# Examples

See the folder [examples/](./examples).
See the [examples/](./examples) directory.

# Projects using flake-parts

Expand Down
6 changes: 3 additions & 3 deletions examples/project-commands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ This example shows how to create scripts for your project, by leveraging [missio
This is a **potential** alternative to:

- Using a `Makefile` to manage your project's scripts
- Using the popular [Scripts To Rule Them All](https://github.com/github/scripts-to-rule-them-all) approach (having a `scripts/` folder)
- Using a `bin/` folder
- Using the popular [Scripts To Rule Them All](https://github.com/github/scripts-to-rule-them-all); a naming convention for a `scripts/` directory
- Using a `bin/` directory

## Explanation

In this example we use the [avro-tools](https://avro.apache.org/) to convert our scripts from `.avdl` to `.avsc`.

You don't need to know anything about avro to understand mission-control and use this example (that's nix baby 🚀).
You don't need to know anything about avro to understand mission-control and use this example (that's Nix baby 🚀).

When setting up [mission-control](https://github.com/Platonic-Systems/mission-control), we add
one script called `build`. Because of `wrapperName = "run";`, once we open the shell created by nix,
Expand Down
10 changes: 5 additions & 5 deletions examples/shell-environments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ includes a diverse set of tools:
terraform
wget
bat
git
nixpkgs-fmt
```

You can search for more package in [nix packages](https://search.nixos.org/packages)
You can search for more packages in [nix packages](https://search.nixos.org/packages)

## Usage

Expand All @@ -32,7 +32,7 @@ nix develop .#another_env

## Troubleshooting

### My shell has changed
### I get bash instead of my shell

There 2 possible solutions:

Expand All @@ -42,9 +42,9 @@ Second is a simple-unreliable hack, which is adding a `shellHook` to `devShells`

```nix
devShells.default = pkgs.mkShell {
shellHook = ''
shellHook = ''
exec $SHELL
'';
'';
};
```

Expand Down
2 changes: 1 addition & 1 deletion examples/shell-environments/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
systems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ terraform wget bat git ];
nativeBuildInputs = with pkgs; [ terraform wget bat nixpkgs-fmt ];
};

devShells.another_env = pkgs.mkShell {
Expand Down
8 changes: 4 additions & 4 deletions modules/devShells.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ mkTransposedPerSystemModule {
[`nix develop .#<name>`](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-develop.html) will run `devShells.<name>`.
'';
example = literalExpression ''
{
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ wget bat git cargo ];
{
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ wget bat cargo ];
};
}
}
'';
};
file = ./devShells.nix;
Expand Down

0 comments on commit e74a33a

Please sign in to comment.