oizys/.github/workflows/build.yml

58 lines
1.6 KiB
YAML

name: Build NixOS
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
HOSTS: "algiz othalan mannaz"
jobs:
build:
# strategy:
# matrix:
# hosts: "algiz othalan mannaz"
# try to use the cache here along the way
# fail-fast: true
# max-parallel: 1
runs-on: ubuntu-latest
steps:
# free up some space
- run: sudo rm -rf /opt&
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25 # v25
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: >
trusted-public-keys =
hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=
nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=
daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k=
cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters =
https://hyprland.cachix.org
https://nixpkgs-wayland.cachix.org
https://daylin.cachix.org
https://cache.nixos.org
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: cachix/cachix-action@v14
with:
name: daylin
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build
shell: bash
run: |
for host in ${HOSTS[@]}
do
./modules/styx/styx cache --host $host --flake .
done
# - name: Push
# env:
# CACHIX_ACTIVATE_TOKEN: "${{ secrets.CACHIX_ACTIVATE_TOKEN }}"
# run: cachix push daylin ./result