File tree 5 files changed +226
-1
lines changed
5 files changed +226
-1
lines changed Original file line number Diff line number Diff line change
1
+ use flake
Original file line number Diff line number Diff line change 2
2
* .zip
3
3
4
4
# Exclude exported Modrinth modpacks
5
- * .mrpack
5
+ * .mrpack
6
+
7
+ # Exclude .direnv
8
+ .direnv
9
+
10
+ # Eclude precommit hooks config
11
+ .pre-commit-config.yaml
Original file line number Diff line number Diff line change
1
+ {
2
+ description = "A template designed to streamline the release process of Minecraft modpacks." ;
3
+ inputs = {
4
+ nixpkgs . url = "github:NixOS/nixpkgs/nixpkgs-unstable" ;
5
+ flake-parts = {
6
+ url = "github:hercules-ci/flake-parts" ;
7
+ inputs . nixpkgs-lib . follows = "nixpkgs" ;
8
+ } ;
9
+ pre-commit-hooks = {
10
+ url = "github:cachix/pre-commit-hooks.nix" ;
11
+ inputs . nixpkgs . follows = "nixpkgs" ;
12
+ } ;
13
+ } ;
14
+ outputs = inputs :
15
+ inputs . flake-parts . lib . mkFlake { inherit inputs ; } {
16
+ systems = [ "x86_64-linux" ] ;
17
+
18
+ imports = [
19
+ ./pre-commit-hooks.nix
20
+ ] ;
21
+
22
+ perSystem = {
23
+ config ,
24
+ pkgs ,
25
+ ...
26
+ } : {
27
+ devShells . default = pkgs . mkShell {
28
+ packages = [
29
+ pkgs . alejandra
30
+ pkgs . git
31
+ pkgs . packwiz
32
+ pkgs . yamllint
33
+ ] ;
34
+ name = "mc-modpack-kit" ;
35
+ DIRENV_LOG_FORMAT = "" ;
36
+ shellHook = ''
37
+ ${ config . pre-commit . installationScript }
38
+ '' ;
39
+ } ;
40
+
41
+ formatter = pkgs . alejandra ;
42
+ } ;
43
+ } ;
44
+ }
Original file line number Diff line number Diff line change
1
+ { inputs , ...} : {
2
+ imports = [ inputs . pre-commit-hooks . flakeModule ] ;
3
+
4
+ perSystem . pre-commit = {
5
+ settings . excludes = [ "flake.lock" ] ;
6
+
7
+ settings = {
8
+ hooks = {
9
+ alejandra . enable = true ;
10
+ yamllint . relaxed = true ;
11
+ } ;
12
+ settings . yamllint . relaxed = true ;
13
+ } ;
14
+ } ;
15
+ }
You can’t perform that action at this time.
0 commit comments