mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 16:16:50 +01:00
feat: add a fmt github action
This commit is contained in:
parent
76055bdf3f
commit
2c0c99180e
4 changed files with 50 additions and 9 deletions
|
|
@ -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 |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue