refactor: switch formatter from nixpkgs-fmt to alejandra
This commit is contained in:
@@ -37,7 +37,7 @@ Personal Nix flake: custom packages, overlays, NixOS/Home Manager modules, dev s
|
|||||||
|
|
||||||
## CONVENTIONS
|
## CONVENTIONS
|
||||||
|
|
||||||
**Formatter**: `nix fmt` before commit (nixpkgs-fmt)
|
**Formatter**: `nix fmt` before commit (alejandra)
|
||||||
|
|
||||||
**Naming**:
|
**Naming**:
|
||||||
- Packages: `lowercase-hyphen` (e.g., `hyprpaper-random`)
|
- Packages: `lowercase-hyphen` (e.g., `hyprpaper-random`)
|
||||||
@@ -105,7 +105,7 @@ Generated: `/etc/m3ta/ports.json` (NixOS), `~/.config/m3ta/ports.json` (HM)
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix flake check # Validate flake
|
nix flake check # Validate flake
|
||||||
nix fmt # Format (nixpkgs-fmt)
|
nix fmt # Format (alejandra)
|
||||||
nix build .#<pkg> # Build package
|
nix build .#<pkg> # Build package
|
||||||
nix flake show # List outputs
|
nix flake show # List outputs
|
||||||
nix develop # Enter dev shell
|
nix develop # Enter dev shell
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
# Formatter for 'nix fmt'
|
# Formatter for 'nix fmt'
|
||||||
formatter = forAllSystems (
|
formatter = forAllSystems (
|
||||||
system:
|
system:
|
||||||
(pkgsFor system).nixpkgs-fmt
|
(pkgsFor system).alejandra
|
||||||
);
|
);
|
||||||
|
|
||||||
# Templates for creating new packages/modules
|
# Templates for creating new packages/modules
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
nil # Nix LSP
|
nil # Nix LSP
|
||||||
nixpkgs-fmt # Nix formatter
|
alejandra # Nix formatter
|
||||||
nix-tree # Explore dependency trees
|
nix-tree # Explore dependency trees
|
||||||
statix # Nix linter
|
statix # Nix linter
|
||||||
deadnix # Find dead Nix code
|
deadnix # Find dead Nix code
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
echo " nix flake check - Check flake validity"
|
echo " nix flake check - Check flake validity"
|
||||||
echo " nix flake show - Show flake outputs"
|
echo " nix flake show - Show flake outputs"
|
||||||
echo " nix build .#<pkg> - Build a package"
|
echo " nix build .#<pkg> - Build a package"
|
||||||
echo " nixpkgs-fmt . - Format Nix files"
|
echo " nix fmt . - Format Nix files"
|
||||||
echo " statix check . - Lint Nix files"
|
echo " statix check . - Lint Nix files"
|
||||||
echo " deadnix . - Find dead code"
|
echo " deadnix . - Find dead code"
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user