infrastructure/.github/workflows/nixos.yml

150 lines
4.2 KiB
YAML

name: NixOS
on:
push:
branches: [main]
jobs:
build-aoife:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v18
- name: "Install Cachix ❄️"
uses: cachix/cachix-action@v12
with:
name: 0x76-infra
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
extraPullNames: hyprland
- name: "Build NixOS config ❄️"
run: |
nix run '.#' build -- --on "aoife"
build-iso:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v18
- name: "Install Cachix ❄️"
uses: cachix/cachix-action@v12
with:
name: 0x76-infra
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: "Build NixOS ISO ❄️"
run: |
nix build '.#iso'
build-lxc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v18
- name: "Install Cachix ❄️"
uses: cachix/cachix-action@v12
with:
name: 0x76-infra
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: "Build NixOS Proxmox LXC ❄️"
run: |
nix build '.#proxmox-lxc'
build-olympus:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v18
- name: "Install Cachix ❄️"
uses: cachix/cachix-action@v12
with:
name: 0x76-infra
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
extraPullNames: hyprland
- name: "Build NixOS config ❄️"
run: |
nix run '.#' build -- --on "@olympus"
build-hades:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v18
- name: "Install Cachix ❄️"
uses: cachix/cachix-action@v12
with:
name: 0x76-infra
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: "Build NixOS config ❄️"
run: |
nix run '.#' build -- --on "@hades"
# disabled because of OOM errors
# check:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: "Install Nix ❄️"
# uses: cachix/install-nix-action@v18
# - name: "Install Cachix ❄️"
# uses: cachix/cachix-action@v11
# with:
# name: 0x76-infra
# authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# - name: "Check NixOS Flake ❄️"
# run: |
# nix flake check