alpha
Login
or
Join now
lass.pds.lassul.us
/
superconfig
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
1
Pipelines
ci: expose checks as flake checks
author
lassulus
date
10 months ago
(Nov 27, 2025, 8:42 AM CET)
commit
b6a7c7e9
b6a7c7e9ad575a40284ade5b8e08a8affa3bf070
parent
44b92f32
44b92f3276781d266398b0cbbdb9d8d738aa4aef
+30
-36
2 changed files
Expand all
Collapse all
Unified
Split
.github
workflows
ci.yml
flake.nix
+27
flake.nix
View file
Reviewed
···
195
195
})
196
196
];
197
197
};
198
198
+
checks =
199
199
+
let
200
200
+
# Check NixOS configurations can be evaluated (without building)
201
201
+
nixosChecks = lib.mapAttrs' (
202
202
+
name: config:
203
203
+
lib.nameValuePair "nixos-${name}" (
204
204
+
pkgs.runCommand "eval-${name}" { } ''
205
205
+
# Force evaluation of the toplevel path without building
206
206
+
echo "Evaluating ${name}: ${builtins.unsafeDiscardStringContext config.config.system.build.toplevel.drvPath}"
207
207
+
touch $out
208
208
+
''
209
209
+
)
210
210
+
) (lib.filterAttrs (_: config: config.pkgs.system == system) self.nixosConfigurations);
211
211
+
212
212
+
# Check Darwin configurations can be evaluated (without building)
213
213
+
darwinChecks = lib.mapAttrs' (
214
214
+
name: config:
215
215
+
lib.nameValuePair "darwin-${name}" (
216
216
+
pkgs.runCommand "eval-darwin-${name}" { } ''
217
217
+
# Force evaluation of the system path without building
218
218
+
echo "Evaluating ${name}: ${builtins.unsafeDiscardStringContext config.system.drvPath}"
219
219
+
touch $out
220
220
+
''
221
221
+
)
222
222
+
) (lib.filterAttrs (_: config: config.pkgs.system == system) self.darwinConfigurations);
223
223
+
in
224
224
+
nixosChecks // darwinChecks;
198
225
};
199
226
flake.lib = import ./lib { inherit (nixpkgs) lib; };
200
227
};
+3
-36
.github/workflows/ci.yml
View file
Reviewed
···
5
5
pull_request:
6
6
7
7
jobs:
8
8
-
eval-machines:
8
8
+
check:
9
9
runs-on: ubuntu-latest
10
10
steps:
11
11
- uses: actions/checkout@v4
···
20
20
21
21
- uses: DeterminateSystems/magic-nix-cache-action@main
22
22
23
23
-
- name: Evaluate all NixOS configurations
24
24
-
run: |
25
25
-
echo "Evaluating NixOS configurations..."
26
26
-
failed=0
27
27
-
for machine in $(nix eval --json .#nixosConfigurations --apply builtins.attrNames | jq -r '.[]'); do
28
28
-
echo "Evaluating $machine..."
29
29
-
if ! nix eval .#nixosConfigurations.$machine.config.system.build.toplevel --raw; then
30
30
-
echo "❌ Failed to evaluate $machine"
31
31
-
failed=1
32
32
-
else
33
33
-
echo "✅ $machine evaluated successfully"
34
34
-
fi
35
35
-
done
36
36
-
exit $failed
37
37
-
38
38
-
- name: Evaluate all Darwin configurations
39
39
-
run: |
40
40
-
echo "Evaluating Darwin configurations..."
41
41
-
failed=0
42
42
-
for machine in $(nix eval --json .#darwinConfigurations --apply builtins.attrNames 2>/dev/null | jq -r '.[]' 2>/dev/null || echo ""); do
43
43
-
if [ -n "$machine" ]; then
44
44
-
echo "Evaluating $machine..."
45
45
-
if ! nix eval .#darwinConfigurations.$machine.system --raw; then
46
46
-
echo "❌ Failed to evaluate $machine"
47
47
-
failed=1
48
48
-
else
49
49
-
echo "✅ $machine evaluated successfully"
50
50
-
fi
51
51
-
fi
52
52
-
done
53
53
-
exit $failed
54
54
-
55
55
-
- name: Check formatter
56
56
-
run: |
57
57
-
nix fmt -- --fail-on-change
23
23
+
- name: Run flake checks
24
24
+
run: nix flake check