use cachix to install and refactor
This commit is contained in:
parent
df8b563222
commit
2c3c08c640
1 changed files with 28 additions and 12 deletions
40
.github/workflows/build-and-cache.yml
vendored
40
.github/workflows/build-and-cache.yml
vendored
|
@ -11,20 +11,22 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
- macos-latest
|
- macos-latest
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
- uses: DeterminateSystems/nix-installer-action@main
|
- name: Install Nix
|
||||||
with:
|
uses: cachix/install-nix-action@v30
|
||||||
logger: pretty
|
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
- name: Setup Attic cache
|
- name: Setup Attic cache
|
||||||
uses: ryanccn/attic-action@v0
|
uses: ryanccn/attic-action@v0
|
||||||
with:
|
with:
|
||||||
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
||||||
cache: ${{ vars.ATTIC_CACHE }}
|
cache: ${{ vars.ATTIC_CACHE }}
|
||||||
token: ${{ secrets.ATTIC_TOKEN }}
|
token: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
|
||||||
- run: nix build -L '${{ matrix.package }}'
|
- run: nix build -L '${{ matrix.package }}'
|
||||||
|
|
||||||
build-machines:
|
build-machines:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -35,6 +37,7 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
# - macos-latest
|
# - macos-latest
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
|
@ -50,21 +53,30 @@ jobs:
|
||||||
remove-docker-images: 'true'
|
remove-docker-images: 'true'
|
||||||
build-mount-path: /nix
|
build-mount-path: /nix
|
||||||
build-mount-path-ownership: 'root:root'
|
build-mount-path-ownership: 'root:root'
|
||||||
- uses: DeterminateSystems/nix-installer-action@main
|
|
||||||
with:
|
- name: Install Nix
|
||||||
logger: pretty
|
uses: cachix/install-nix-action@v30
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
- name: Setup Attic cache
|
- name: Setup Attic cache
|
||||||
uses: ryanccn/attic-action@v0
|
uses: ryanccn/attic-action@v0
|
||||||
with:
|
with:
|
||||||
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
||||||
cache: ${{ vars.ATTIC_CACHE }}
|
cache: ${{ vars.ATTIC_CACHE }}
|
||||||
token: ${{ secrets.ATTIC_TOKEN }}
|
token: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
|
||||||
|
- uses: cachix/cachix-action@v14
|
||||||
|
with:
|
||||||
|
name: cything
|
||||||
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
useDaemon: false
|
||||||
|
|
||||||
- name: Sync repository
|
- name: Sync repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- run: nix build -L --accept-flake-config .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
|
- run: nix build -L --accept-flake-config .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
|
||||||
|
|
||||||
build-homes:
|
build-homes:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -74,6 +86,7 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
# - macos-latest
|
# - macos-latest
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
|
@ -89,23 +102,26 @@ jobs:
|
||||||
remove-docker-images: 'true'
|
remove-docker-images: 'true'
|
||||||
build-mount-path: /nix
|
build-mount-path: /nix
|
||||||
build-mount-path-ownership: 'root:root'
|
build-mount-path-ownership: 'root:root'
|
||||||
- uses: DeterminateSystems/nix-installer-action@main
|
|
||||||
with:
|
- name: Install Nix
|
||||||
logger: pretty
|
uses: cachix/install-nix-action@v30
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
- name: Setup Attic cache
|
- name: Setup Attic cache
|
||||||
uses: ryanccn/attic-action@v0
|
uses: ryanccn/attic-action@v0
|
||||||
with:
|
with:
|
||||||
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
||||||
cache: ${{ vars.ATTIC_CACHE }}
|
cache: ${{ vars.ATTIC_CACHE }}
|
||||||
token: ${{ secrets.ATTIC_TOKEN }}
|
token: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
|
||||||
- uses: cachix/cachix-action@v14
|
- uses: cachix/cachix-action@v14
|
||||||
with:
|
with:
|
||||||
name: cything
|
name: cything
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
useDaemon: false
|
useDaemon: false
|
||||||
|
|
||||||
- name: Sync repository
|
- name: Sync repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- run: nix build -L --accept-flake-config .#homeConfigurations."${{ matrix.home }}".activationPackage
|
- run: nix build -L --accept-flake-config .#homeConfigurations."${{ matrix.home }}".activationPackage
|
||||||
|
|
Loading…
Add table
Reference in a new issue