File tree Expand file tree Collapse file tree 8 files changed +94
-92
lines changed Expand file tree Collapse file tree 8 files changed +94
-92
lines changed Original file line number Diff line number Diff line change
1
+ # This file contains commits that should be ignored by git blame
2
+ # See https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-file
3
+ # and https://github.com/NixOS/nixpkgs/blob/master/.git-blame-ignore-revs for more info
4
+
5
+ # To enable this in your local repository, run:
6
+ # git config blame.ignoreRevsFile .git-blame-ignore-revs
7
+
8
+ # For rebasing PRs, commits marked with !autorebase will be automatically
9
+ # reapplied by the auto-rebase script
10
+
11
+ # nixfmt-rfc-style formatting
12
+ 51e51e601448705c0d2f92ef90ec7b680123077c # !autorebase cd tests && nix fmt ..
Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- master
7
+ merge_group :
7
8
jobs :
9
+ nixfmt :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+ - uses : cachix/install-nix-action@v31
14
+ - run : cd tests && nix fmt .. -- --fail-on-change
8
15
tests :
16
+ needs : nixfmt
9
17
runs-on : ubuntu-latest
10
18
steps :
11
19
- uses : actions/checkout@v4
12
20
- uses : cachix/install-nix-action@v31
13
- - run : nix run ./tests#run .
21
+ - run : nix run ./tests#run .
Original file line number Diff line number Diff line change 1
1
{
2
2
description = "nixos-hardware" ;
3
3
4
- inputs = {
5
- nixpkgs . url = "github:NixOS/nixpkgs/nixos-25.05-small" ;
6
- treefmt-nix . url = "github:numtide/treefmt-nix" ;
7
- } ;
8
-
9
4
outputs =
5
+ { ... } :
10
6
{
11
- nixpkgs ,
12
- self ,
13
- treefmt-nix ,
14
- } :
15
- let
16
- systems = [
17
- "aarch64-darwin"
18
- "aarch64-linux"
19
- "x86_64-darwin"
20
- "x86_64-linux"
21
- ] ;
22
- forEachSystem =
23
- function : nixpkgs . lib . genAttrs ( systems ) ( system : function nixpkgs . legacyPackages . ${ system } ) ;
24
-
25
- treefmtEval = forEachSystem ( pkgs : treefmt-nix . lib . evalModule pkgs ./treefmt.nix ) ;
26
- in
27
- {
28
- checks = forEachSystem ( pkgs : {
29
- formatting = treefmtEval . ${ pkgs. system } . config . build . check self ;
30
- } ) ;
31
- formatter = forEachSystem ( pkgs : treefmtEval . ${ pkgs. system } . config . build . wrapper ) ;
32
7
33
8
nixosModules =
34
9
let
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # Helper script to update the tests flake hash
3
+ set -euo pipefail
4
+
5
+ # Go to the root of the repository
6
+ cd " $( dirname " $0 " ) /.."
7
+
8
+ echo " Updating tests.narHash..." >&2
9
+
10
+ # Update the flake lock file
11
+ nix --extra-experimental-features ' flakes nix-command' flake lock ./tests
12
+
13
+ # Generate the hash
14
+ nix --extra-experimental-features ' flakes nix-command' hash path ./tests > ./tests.narHash
15
+
16
+ echo " Hash updated successfully: $( cat tests.narHash) "
Original file line number Diff line number Diff line change 3
3
4
4
inputs = {
5
5
nixos-unstable-small . url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-unstable-small" ;
6
- nixos-stable . url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-24.11 " ;
6
+ nixos-stable . url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-25.05 " ;
7
7
# override in the test
8
8
nixos-hardware . url = "github:NixOS/nixos-hardware" ;
9
9
flake-parts . url = "github:hercules-ci/flake-parts" ;
10
10
flake-parts . inputs . nixpkgs-lib . follows = "nixos-unstable-small" ;
11
+ treefmt-nix . url = "github:numtide/treefmt-nix" ;
12
+ treefmt-nix . inputs . nixpkgs . follows = "nixos-unstable-small" ;
11
13
} ;
12
14
13
15
outputs =
14
16
inputs @{ flake-parts , ... } :
15
17
flake-parts . lib . mkFlake { inherit inputs ; } {
18
+ imports = [
19
+ inputs . treefmt-nix . flakeModule
20
+ ] ;
16
21
systems = [
17
22
"aarch64-linux"
18
23
"x86_64-linux"
85
90
in
86
91
{
87
92
_module . args . pkgs = nixpkgsUnstable ;
93
+
94
+ treefmt = {
95
+ flakeCheck = pkgs . hostPlatform . system != "riscv64-linux" ;
96
+ projectRootFile = "COPYING" ;
97
+ programs = {
98
+ deadnix = {
99
+ enable = true ;
100
+ no-lambda-pattern-names = true ;
101
+ } ;
102
+ nixfmt = {
103
+ enable = true ;
104
+ package = pkgs . nixfmt-rfc-style ;
105
+ } ;
106
+ } ;
107
+ settings = {
108
+ on-unmatched = "info" ;
109
+ } ;
110
+ } ;
111
+
88
112
checks =
89
113
checksForNixpkgs "nixos-unstable" nixpkgsUnstable
90
114
// checksForNixpkgs "nixos-stable" nixpkgsStable ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments