Skip to content

feat(hosts): Set up libvirt and back it up on caroline laptop #282

feat(hosts): Set up libvirt and back it up on caroline laptop

feat(hosts): Set up libvirt and back it up on caroline laptop #282

Workflow file for this run

---
name: Check
'on':
push:
branches:
- main
jobs:
format:
name: File formatting
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v23
- name: Check nix file formatting
run: 'nix fmt . -- --check'
- name: Check yaml file formatting
run: 'nix run nixpkgs#yamllint -- --strict --format github .'
- name: Check deadnix file formatting
run: 'nix run nixpkgs#deadnix -- hosts/ modules/ packages/'
- name: Check statix file formatting
run: 'nix run nixpkgs#statix -- check --config .statix.toml'
check:
name: Check flake
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v23
- uses: cachix/cachix-action@v12
with:
name: etu
extraPullNames: 'nix-community'
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Check the flake
run: 'nix flake check'
deploy:
name: Deploy systems
runs-on: ubuntu-22.04
needs: check
# Don't cancel jobs if one job fails
continue-on-error: true
strategy:
matrix:
hostname:
- server-main-elis
- server-sparv
- vps04
- vps06
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v23
- uses: cachix/cachix-action@v12
with:
name: etu
extraPullNames: 'nix-community'
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# Configure SSH key
- uses: shimataro/[email protected]
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
name: id_ed25519
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
# Build systems.
- name: Build system derivation
uses: nick-fields/[email protected]
with:
max_attempts: 2
timeout_minutes: 60
command: 'nix build .#nixosConfigurations.${{ matrix.hostname }}.config.system.build.toplevel'
# Deploy systems
- name: Deploy system
uses: nick-fields/[email protected]
with:
max_attempts: 2
timeout_minutes: 30
command: 'nix develop -c deploy .#${{ matrix.hostname }}'