replace nixfmt with nixpkgs-fmt

nixpkgs-fmt looks like it is going to be the standard formatter for
nixpkgs, so we should follow suite.
This commit is contained in:
Timothy DeHerrera 2020-07-30 22:05:36 -06:00
parent 3501100952
commit 9ba71d5b62
No known key found for this signature in database
GPG Key ID: 8985725DB5B0C122
4 changed files with 5 additions and 5 deletions

View File

@ -6,11 +6,11 @@ the `template` branch to provide a host of useful NixOS configurations available
"out of the box". If you wish to contribute such an expression please follow "out of the box". If you wish to contribute such an expression please follow
these guidelines: these guidelines:
* format your code with [`nixfmt`][nixfmt] * format your code with [`nixpkgs-fmt`][nixpkgs-fmt]
* The commit message follows the same semantics as [nixpkgs][nixpkgs]. * The commit message follows the same semantics as [nixpkgs][nixpkgs].
* You can use a `#` symbol to specify ambiguities. For example, * You can use a `#` symbol to specify ambiguities. For example,
`develop#zsh: <rest of commit message>` would tell me that your updating the `develop#zsh: <rest of commit message>` would tell me that your updating the
`zsh` subprofile living under the `develop` profile. `zsh` subprofile living under the `develop` profile.
[nixfmt]: https://github.com/serokell/nixfmt [nixpkgs-fmt]: https://github.com/nix-community/nixpkgs-fmt
[nixpkgs]: https://github.com/NixOS/nixpkgs [nixpkgs]: https://github.com/NixOS/nixpkgs

View File

@ -6,7 +6,7 @@
kak-lsp kak-lsp
kakoune-config kakoune-config
kakoune-unwrapped kakoune-unwrapped
nixfmt nixpkgs-fmt
python3Packages.python-language-server python3Packages.python-language-server
rustup rustup
nix-linter nix-linter

View File

@ -4,7 +4,7 @@ hook -group lint global WinSetOption filetype=nix %{
set buffer lintcmd '/etc/xdg/kak/autoload/lint/nix.sh $1' set buffer lintcmd '/etc/xdg/kak/autoload/lint/nix.sh $1'
lint-enable lint-enable
set buffer formatcmd "nixfmt" set buffer formatcmd "nixpkgs-fmt"
hook buffer BufWritePre .* %{ hook buffer BufWritePre .* %{
format format
lint lint

View File

@ -1,6 +1,6 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
nix-linter $1 2>&1 | < /dev/stdin > /tmp/lint.out nix-linter -W all $1 2>&1 | < /dev/stdin > /tmp/lint.out
if head -1 /tmp/lint.out | grep Failure &> /dev/null; then if head -1 /tmp/lint.out | grep Failure &> /dev/null; then
sed -n 2p /tmp/lint.out | tr '\n' ' ' sed -n 2p /tmp/lint.out | tr '\n' ' '
printf "error: " printf "error: "