Skip to content

Commit

Permalink
Add NixOS configuration build workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
yousiki committed Mar 24, 2024
1 parent b9b63f7 commit 06bdede
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 26 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build-devshell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build NixOS configuration

on:
push:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Check flake.lock file
uses: DeterminateSystems/flake-checker-action@main
- name: Install nix and flakes
uses: DeterminateSystems/nix-installer-action@main
- name: Use magic nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Use cachix nix cache
uses: cachix/cachix-action@master
with:
name: nichijou
extraPullNames: colmena,cuda-maintainers,hyprland,nix-community,nixpkgs-wayland,numtide,nrdxp
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build devshell
run: nix develop --command "echo 'Hello, world!'"
12 changes: 12 additions & 0 deletions .github/workflows/build-hakase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Build hakase configuration

on:
push:
workflow_dispatch:

jobs:
call-workflow-passing-data:
uses: ./.github/workflows/build-nixos.yaml
with:
configuration: hakase
secrets: inherit
32 changes: 32 additions & 0 deletions .github/workflows/build-nixos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build NixOS configuration

on:
workflow_call:
inputs:
configuration:
required: true
type: string
secrets:
CACHIX_AUTH_TOKEN:
required: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Check flake.lock file
uses: DeterminateSystems/flake-checker-action@main
- name: Install nix and flakes
uses: DeterminateSystems/nix-installer-action@main
- name: Use magic nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Use cachix nix cache
uses: cachix/cachix-action@master
with:
name: nichijou
extraPullNames: colmena,cuda-maintainers,hyprland,nix-community,nixpkgs-wayland,numtide,nrdxp
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build system configuration
run: nix build ".#nixosConfigurations.${{ inputs.configuration }}.config.system.build.toplevel"
26 changes: 0 additions & 26 deletions .github/workflows/build.yaml

This file was deleted.

0 comments on commit 06bdede

Please sign in to comment.