Skip to content

Commit

Permalink
flake/generate-files: use nixfmt directly
Browse files Browse the repository at this point in the history
Running `nix fmt` is unnecessary in this case.
  • Loading branch information
MattSturgeon committed Jul 31, 2024
1 parent 0b23a4c commit 3789c69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flake-modules/updates/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
apps.generate-files.program = pkgs.writeShellApplication {
name = "generate-files";

runtimeInputs = [ pkgs.nixfmt-rfc-style ];

text = ''
repo_root=$(git rev-parse --show-toplevel)
generated_dir=$repo_root/generated
Expand All @@ -25,16 +27,14 @@
generate() {
echo "$2"
cp "$1" "$generated_dir/$2.nix"
nixfmt "$generated_dir/$2.nix"
}
mkdir -p "$generated_dir"
generate "${config.packages.rust-analyzer-options}" "rust-analyzer"
generate "${config.packages.efmls-configs-sources}" "efmls-configs"
generate "${config.packages.none-ls-builtins}" "none-ls"
git add --intent-to-add "$generated_dir"
nix fmt
if [ -n "$commit" ]; then
cd "$generated_dir"
git add .
Expand Down

0 comments on commit 3789c69

Please sign in to comment.