Skip to content

Commit e88d869

Browse files
authored
fix(spore): use lib.mkForce to override gc options from base module (#435)
The base gc.nix sets nix.gc.options; spore's override conflicted without mkForce. Also adds a fast eval-only CI job that checks all NixOS configurations evaluate before the full build runs, catching option conflicts like this at PR time.
1 parent 4d7ff2c commit e88d869

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,24 @@ on:
66
branches: main
77

88
jobs:
9+
eval:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: cachix/install-nix-action@v31
14+
with:
15+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
16+
- name: Check all configurations evaluate
17+
run: |
18+
for host in glyph spore zeta; do
19+
echo "Evaluating $host..."
20+
nix eval .#nixosConfigurations.$host.config.system.build.toplevel.drvPath
21+
done
22+
echo "Evaluating Rhizome..."
23+
nix eval .#darwinConfigurations.Rhizome.system.drvPath
24+
925
build:
26+
needs: eval
1027
strategy:
1128
fail-fast: false
1229
matrix:

CLAUDE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ nixos-rebuild switch --flake .#hostname # Linux
4747
nixos-rebuild switch --flake .#spore --target-host root@spore --build-host localhost
4848
```
4949

50+
**Checking changes before committing:**
51+
```bash
52+
nix-flake eval nixosConfigurations.hostname.config.system.build.toplevel.drvPath
53+
```
54+
Evaluates a host's configuration without building it. Catches option conflicts and type errors fast — run this after editing any NixOS module or host config.
55+
5056
**Flake management:**
5157
```bash
5258
nix flake update --commit-lock-file

hosts/spore/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252

5353
# Stricter GC due to limited disk space (30 GB)
5454
nix.gc = {
55-
dates = "daily";
56-
options = "--delete-older-than 7d";
55+
dates = lib.mkForce "daily";
56+
options = lib.mkForce "--delete-older-than 7d";
5757
};
5858

5959
nix.settings = {

0 commit comments

Comments
 (0)