flake: refactor packages to fit expectations

This commit is contained in:
Cassie Cheung 2025-02-07 11:48:15 +08:00
parent a71dc85e76
commit 81f28602aa
No known key found for this signature in database
4 changed files with 52 additions and 31 deletions

View file

@ -23,14 +23,14 @@ jobs:
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@master
with:
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
remove-large-packages: 'true'
remove-cached-tools: 'true'
remove-swapfile: 'true'
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
remove-large-packages: 'true'
remove-cached-tools: 'true'
remove-swapfile: 'true'
- name: Checkout
uses: actions/checkout@v4
- name: "Install Nix"
@ -47,8 +47,8 @@ jobs:
env:
GC_DONT_GC: 1
run: |
for output in $(nix flake show --json | nix run nixpkgs#jq -- -r 'keys[]'); do
nix build .#$output --accept-flake-config
for output in $(nix flake show --json | nix run nixpkgs#jq -- -r '.packages."x86_64-linux" | keys[]'); do
nix build .#packages.x86_64-linux.${output} --accept-flake-config
if [ $(du -B1M result/iso/*.iso | cut -f1) -gt 2000 ]; then
split -d result/iso/*.iso -b 2000M nixos-$output.iso.part-
else