Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Aug 4, 2024
1 parent e71527c commit 760c380
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
pre-commit-nix.url = "github:cachix/pre-commit-hooks.nix";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "";
};
};

outputs =
{ self, flake-parts, ... }@inputs:
flake-parts.lib.mkFlake { inherit self inputs; } {
imports = [ inputs.pre-commit-nix.flakeModule ];
imports = if inputs.git-hooks ? flakeModule then [ inputs.git-hooks.flakeModule ] else [ ];

flake.flakeModule.imports = [ ./modules ];

Expand Down Expand Up @@ -63,7 +70,8 @@
utils = pkgs.callPackage ./pkgs/utils.nix { };
chaivim = pkgs.callPackage ./pkgs/chaivim.nix { };
};

}
// inputs.nixpkgs.lib.optionalAttrs (inputs.git-hooks ? flakeModule) {
pre-commit.settings.hooks = {
nixfmt.enable = true;
stylua.enable = true;
Expand Down

0 comments on commit 760c380

Please sign in to comment.