huge refactor
This commit is contained in:
parent
03e5a47910
commit
1d4c8455ee
30 changed files with 972 additions and 697 deletions
108
moduler/features/README.md
Normal file
108
moduler/features/README.md
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
# Feature Profiles
|
||||
|
||||
This directory provides a profile + overrides model for host configuration.
|
||||
|
||||
## Imports
|
||||
|
||||
Use this in host `imports`:
|
||||
|
||||
```nix
|
||||
(modulesDirectory + /features/standard)
|
||||
```
|
||||
|
||||
`features/standard` imports:
|
||||
|
||||
- `features` profile module
|
||||
- `services/users`
|
||||
- `services/network`
|
||||
- `services/system`
|
||||
- `services/sound`
|
||||
- `programs/base`
|
||||
- `programs/git`
|
||||
- `programs/dev`
|
||||
|
||||
## Profile Selection
|
||||
|
||||
Set one profile per host:
|
||||
|
||||
```nix
|
||||
features.profile = "desktop";
|
||||
```
|
||||
|
||||
Supported values:
|
||||
|
||||
- `custom`
|
||||
- `desktop`
|
||||
- `laptop`
|
||||
- `server`
|
||||
- `camera`
|
||||
|
||||
Profiles set `mkDefault` values, so you can override any option per host.
|
||||
|
||||
## Common Overrides
|
||||
|
||||
### Base packages
|
||||
|
||||
```nix
|
||||
features.base = {
|
||||
enable = true;
|
||||
preset = "minimal";
|
||||
packages.captureEnable = true;
|
||||
};
|
||||
```
|
||||
|
||||
### Dev tools
|
||||
|
||||
```nix
|
||||
features.dev = {
|
||||
enable = true;
|
||||
preset = "minimal";
|
||||
cloud.aws.enable = false;
|
||||
cloud.azure.enable = false;
|
||||
};
|
||||
```
|
||||
|
||||
### Network
|
||||
|
||||
```nix
|
||||
features.network = {
|
||||
enable = true;
|
||||
netbird.enable = false;
|
||||
tooling.enable = false;
|
||||
};
|
||||
```
|
||||
|
||||
### Sound/Bluetooth
|
||||
|
||||
```nix
|
||||
features.sound = {
|
||||
enable = true;
|
||||
bluetooth.enable = false;
|
||||
};
|
||||
```
|
||||
|
||||
### Git defaults
|
||||
|
||||
```nix
|
||||
features.git = {
|
||||
enable = true;
|
||||
userName = "myuser";
|
||||
userEmail = "me@example.com";
|
||||
};
|
||||
```
|
||||
|
||||
### Users
|
||||
|
||||
```nix
|
||||
features.users = {
|
||||
enable = true;
|
||||
name = "fw";
|
||||
fullName = "Fredrik Wastring";
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
};
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- If you only import `features/default.nix`, profile defaults are applied only for options that exist in imported modules.
|
||||
- `features/standard` is the easiest option for hosts that should expose all common feature knobs.
|
||||
Loading…
Add table
Add a link
Reference in a new issue