2021-02-14 05:38:20 +03:00
|
|
|
# Suites
|
2022-11-08 17:06:32 +03:00
|
|
|
|
2021-10-07 12:11:21 +03:00
|
|
|
Suites provide a mechanism for users to easily combine and name collections of
|
2021-07-16 20:45:48 +03:00
|
|
|
profiles.
|
2021-02-14 05:38:20 +03:00
|
|
|
|
2021-06-09 04:27:54 +03:00
|
|
|
`suites` are defined in the `importables` argument in either the `home` or `nixos`
|
2021-10-07 12:11:21 +03:00
|
|
|
namespace. They are a special case of an `importable` which is passed as a special
|
2021-06-09 04:27:54 +03:00
|
|
|
argument (one that can be use in an `imports` line) to your hosts. All lists defined
|
|
|
|
in `suites` are flattened and type-checked as paths.
|
2021-04-27 04:29:05 +03:00
|
|
|
|
2021-02-14 05:38:20 +03:00
|
|
|
## Definition
|
2022-11-08 17:06:32 +03:00
|
|
|
|
2021-02-14 05:38:20 +03:00
|
|
|
```nix
|
|
|
|
rec {
|
|
|
|
workstation = [ profiles.develop profiles.graphical users.nixos ];
|
|
|
|
mobileWS = workstation ++ [ profiles.laptop ];
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
2022-11-08 17:06:32 +03:00
|
|
|
|
2021-02-14 05:38:20 +03:00
|
|
|
`hosts/my-laptop.nix`:
|
2022-11-08 17:06:32 +03:00
|
|
|
|
2021-02-14 05:38:20 +03:00
|
|
|
```nix
|
|
|
|
{ suites, ... }:
|
|
|
|
{
|
|
|
|
imports = suites.mobileWS;
|
|
|
|
}
|
|
|
|
```
|