File tree Expand file tree Collapse file tree 7 files changed +123
-0
lines changed
Expand file tree Collapse file tree 7 files changed +123
-0
lines changed Original file line number Diff line number Diff line change 2121 '' ;
2222 buildInputs = with pkgs ; [
2323 editorconfig-checker
24+
25+ # go
2426 go
27+
28+ # java
29+ jdk
30+ maven
2531 ] ;
2632 } ;
2733 }
3238 path = ./template/go ;
3339 description = "Setup Go Project" ;
3440 } ;
41+ java = {
42+ path = ./template/java ;
43+ description = "Setup Java Project" ;
44+ } ;
3545 } ;
3646 } ;
3747}
Original file line number Diff line number Diff line change 1+ ; https://editorconfig.org
2+ root = true
3+
4+ ; default configuration
5+ [* ]
6+ charset = utf-8
7+ end_of_line = lf
8+ trim_trailing_whitespace = true
9+ insert_final_newline = true
10+ indent_style = unset
11+
12+ [{* .nix,flake.lock} ]
13+ indent_style = space
14+ indent_size = 2
15+
16+ [* .{yml,yaml,xml} ]
17+ indent_style = space
18+ indent_size = 2
19+
20+ [* .md ]
21+ indent_style = space
22+ indent_size = 2
23+
24+ [* .java ]
25+ indent_style = space
26+ indent_size = 4
Original file line number Diff line number Diff line change 1+ use flake
Original file line number Diff line number Diff line change 1+ name : main
2+ on :
3+ pull_request :
4+ branches : [main]
5+ push :
6+ branches : [main]
7+ env :
8+ CI_NIX_STORE : ~/nix
9+ CI_NIX_FLAKE : .#default
10+ jobs :
11+ lint :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Setup Nix
15+ uses : cachix/install-nix-action@v26
16+ - name : Checkout
17+ uses : actions/checkout@v4
18+ - name : Cache Nix
19+ uses : actions/cache@v4
20+ with :
21+ path : ${{ env.CI_NIX_STORE }}
22+ key : ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }}
23+ - name : Lint
24+ run : |
25+ nix --store ${{ env.CI_NIX_STORE }} \
26+ develop ${{ env.CI_NIX_FLAKE }} --command \
27+ editorconfig-checker && echo "ok"
Original file line number Diff line number Diff line change 1+ # Java Project
Original file line number Diff line number Diff line change 1+ {
2+ description = "Java Project" ;
3+
4+ inputs . nixpkgs . url = "github:NixOS/nixpkgs/nixpkgs-unstable" ;
5+
6+ outputs = { self , nixpkgs } :
7+ let
8+ forAllSystems = nixpkgs . lib . genAttrs nixpkgs . lib . systems . flakeExposed ;
9+ in
10+ {
11+ devShells = forAllSystems ( system :
12+ let
13+ pkgs = nixpkgs . legacyPackages . ${ system } ;
14+ in
15+ {
16+ default = pkgs . mkShell {
17+ name = "java-project" ;
18+ shellHook = ''
19+ git config pull.rebase true
20+ ${ pkgs . neo-cowsay } /bin/cowsay -f sage "Java Project"
21+ '' ;
22+ buildInputs = with pkgs ; [
23+ editorconfig-checker
24+ jdk
25+ maven
26+ ] ;
27+ } ;
28+ }
29+ ) ;
30+ } ;
31+ }
You can’t perform that action at this time.
0 commit comments