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

flake-modules: minor tweaks from #1629 #1634

Merged
merged 5 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 12 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Git revisions added to this file will be ignored by GitHub's blame feature.
#
# This can also be used locally with `git blame` by configuring your "blame.ignoreRevsFile":
# git config blame.ignoreRevsFile .git-blame-ignore-revs
#
# Or you can this on an ad-hock basis with the `--ignore-revs-file` argument:
# git blame --ignore-revs-file .git-blame-ignore-revs

# This commit reformatted from alejandra to nixfmt-rfc-style:
# 2024-05-05: treewide: Reformat with nixfmt
62f32bfc711f0a3c8a52af4c0790345b4b3d2346

1 change: 0 additions & 1 deletion flake-modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
./templates.nix
./tests.nix
./wrappers.nix
inputs.flake-root.flakeModule
];

perSystem =
Expand Down
15 changes: 9 additions & 6 deletions flake-modules/dev/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,27 @@

perSystem =
{ pkgs, config, ... }:
let
fmt = pkgs.nixfmt-rfc-style;
in
{
formatter = config.treefmt.build.wrapper;

treefmt.config = {
inherit (config.flake-root) projectRootFile;
package = pkgs.treefmt;
projectRootFile = "flake.nix";

programs = {
nixfmt-rfc-style.enable = true;
nixfmt = {
enable = true;
package = fmt;
};
statix.enable = true;
};
};

pre-commit = {
settings.hooks = {
nixfmt = {
package = pkgs.nixfmt-rfc-style;
enable = true;
package = fmt;
};
statix = {
enable = true;
Expand Down
16 changes: 0 additions & 16 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
# A flake-parts module for finding the project root directory
flake-root.url = "github:srid/flake-root";
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down