Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make formatting mandatory #53

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
flake: Make formatting mandatory
There are quite a few files that are not correctly formatted.
This change makes formatting mandatory by adding a formatting
check.
britter committed Oct 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit ddda1aacabd156a6ee3719979b5f2d700d482ab5
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -56,12 +56,13 @@
}
);
formatter = eachSystem (
{ pkgs, ... }: pkgs.callPackage ./formatter.nix { inputs = publicInputs // privateInputs; }
{ pkgs, ... }: (pkgs.callPackage ./formatter.nix { inputs = publicInputs // privateInputs; }).config.build.wrapper
);

checks = eachSystem (
{ pkgs, ... }:
{
formatting = (pkgs.callPackage ./formatter.nix { inputs = publicInputs // privateInputs; }).config.build.check publicInputs.self;
minimal-machine =
(pkgs.nixos [
publicInputs.self.nixosModules.facter
2 changes: 1 addition & 1 deletion formatter.nix
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
let
hasNixFmt = pkgs.lib.meta.availableOn pkgs.stdenv.buildPlatform pkgs.nixfmt-rfc-style.compiler;
in
inputs.treefmt-nix.lib.mkWrapper pkgs {
inputs.treefmt-nix.lib.evalModule pkgs {
projectRootFile = ".git/config";

programs = {