Skip to content

Commit 48429d5

Browse files
authored
feat: doc nixos-raspberrypi (#140)
Signed-off-by: Samuel Silva <samuel@ossystems.com.br>
1 parent c4b2391 commit 48429d5

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

docs/content/getting-started/folder_structure.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ command = "memcached"
133133

134134
## **Hosts** for machine configurations
135135

136-
## `hosts/<hostname>/(default.nix|configuration.nix|darwin-configuration.nix,system-configuration.nix)`
136+
## `hosts/<hostname>/(default.nix|configuration.nix|darwin-configuration.nix,system-configuration.nix,rpi-configuration.nix)`
137137

138138
Nix runs on many different operating systems and architecture. When you create a flake, you can define what systems it can produce outputs for.
139139

@@ -230,6 +230,30 @@ Flake outputs:
230230
* `systemConfigs.<hostname>`
231231
* `checks.<system>.system-<hostname>` - contains the system closure.
232232

233+
### `rpi-configuration.nix`
234+
235+
Evaluates to a [nixos-raspberrypi](https://github.com/nvmd/nixos-raspberrypi) configuration.
236+
237+
To support it, also add the following lines to the `flake.nix` file:
238+
239+
```nix
240+
{
241+
inputs.nixos-raspberrypi.url = "github:nvmd/nixos-raspberrypi";
242+
}
243+
```
244+
245+
Additional values passed:
246+
247+
* `inputs` maps to the current flake inputs.
248+
* `flake` maps to `inputs.self`.
249+
* `hostName`: the hostname of the system, which is used to generate the output names.
250+
* `perSystem`: contains the packages of all the inputs, filtered per system.
251+
Eg: `perSystem.nixos-anywhere.default` is a shorthand for `inputs.nixos-anywhere.packages.<system>.default`.
252+
253+
Flake outputs:
254+
255+
* `nixosConfigurations.<hostname>`
256+
233257
### `default.nix`
234258

235259
If present, this file takes precedence over `configuration.nix` and `darwin-configuration.nix` and is designed as an escape hatch, allowing the user complete control over `nixosSystem` or `darwinSystem` calls.

0 commit comments

Comments
 (0)