ci: automate updating flake inputs #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build all Nix configurations | |
on: | |
pull_request: | |
branches: [master] | |
push: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
test_nixos_builds: | |
name: Build NixOS configurations | |
runs-on: ubuntu-latest | |
container: | |
image: nixos/nix:latest | |
env: | |
NIX_EXPERIMENTAL_FEATURES: "nix-command flakes" | |
volumes: | |
- docker_volume:/volume_mount | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: davsanchez | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Build Darwin VM | |
run: nixos-rebuild build --flake .#nixosConfigurations.darwinVM | |
- name: Build UTM VM | |
run: nixos-rebuild build .#darwinConfigurations.nr-vm-utm | |
# TODO: aarch64-darwin is not yet available to run on GitHub Actions | |
# test_darwin_builds: | |
# name: Build Darwin configurations | |
# runs-on: macos-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Install Nix | |
# uses: DeterminateSystems/nix-installer-action@v7 | |
# - uses: cachix/cachix-action@v12 | |
# with: | |
# name: davsanchez | |
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
# - name: Install nix-darwin | |
# run: nix run nix-darwin -- switch --flake .#darwinConfigurations.mbp | |
# - name: Build Darwin MBP | |
# run: darwin-rebuild build --flake .#darwinConfigurations.mbp | |
# - name: Build Darwin Mini | |
# run: darwin-rebuild build --flake .#darwinConfigurations.mini | |
test_home_manager_builds: | |
name: Build Home Manager configurations | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
# TODO: aarch64-darwin is not yet available to run on GitHub Actions | |
# - macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v7 | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: davsanchez | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Install home-manager | |
run: nix run home-manager/master -- init --switch | |
- name: Build Home Manager david@mbp | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: home-manager build --flake ".#homeConfigurations.david@mbp" | |
- name: Build Home Manager david@mini | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: home-manager build --flake ".#homeConfigurations.david@mini" | |
- name: Build Home Manager davidsanchez@nr-vm | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: home-manager build --flake ".#homeConfigurations.davidsanchez@nr-vm" |