feat: add a fmt github action

This commit is contained in:
Nickolaj Jepsen 2025-12-13 19:41:40 +01:00
parent 76055bdf3f
commit 2c0c99180e
4 changed files with 50 additions and 9 deletions

View file

@ -51,14 +51,17 @@ just bootstrap-flash /dev/sdX
## Adding a New Host
1. Run the new-host command:
```bash
just new-host <hostname> <username>
```
This creates:
- `hosts/<hostname>/` directory
- `secrets/hosts/<hostname>/` with SSH keys
2. Add host configuration in `hosts/default.nix`:
```nix
<hostname> = mkSystem {
hostname = "<hostname>";
@ -72,6 +75,7 @@ just bootstrap-flash /dev/sdX
- Other host-specific modules as needed
4. Generate hardware config:
```bash
just factor <hostname>
# Or for remote:
@ -120,6 +124,7 @@ just age -e <file> -o <output.age>
### Formatting
Code is formatted using `treefmt-nix` with:
- **alejandra** - Nix formatter
- **deadnix** - Remove unused Nix code
- **statix** - Nix linter
@ -173,4 +178,4 @@ Heavily inspired by / stolen from [Flexoki](https://stephango.com/flexoki)
| magenta | #CE5D97 |
| magenta-alt | #A02F6F |
| white | #DAD8CE |
| white-alt | #F2F0E5 |
| white-alt | #F2F0E5 |