fix attic install, use faster nix installer, rm cachix
This commit is contained in:
parent
fb416ea817
commit
8677b08dcc
1 changed files with 19 additions and 24 deletions
43
.github/workflows/build-machines-and-homes.yml
vendored
43
.github/workflows/build-machines-and-homes.yml
vendored
|
@ -5,6 +5,14 @@ on:
|
|||
pull_request:
|
||||
env:
|
||||
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
|
||||
NIX_CONFIG: |
|
||||
show-trace = true
|
||||
extra-substituters = https://cache.cy7.sh/main
|
||||
extra-trusted-public-keys = main:Ku31HoEWcBtfggge2VGj+QTkVrQuIwRIMGyfV/5VQP0=
|
||||
experimental-features = nix-command flakes
|
||||
extra-experimental-features = nix-command flakes
|
||||
accept-flake-config = true
|
||||
TERM: ansi
|
||||
|
||||
jobs:
|
||||
build-machines:
|
||||
|
@ -29,21 +37,15 @@ jobs:
|
|||
remove-codeql: 'true'
|
||||
remove-docker-images: 'true'
|
||||
build-mount-path: /nix
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
with:
|
||||
install_url: https://releases.nixos.org/nix/nix-2.25.4/install
|
||||
extra_nix_config: 'accept-flake-config = true'
|
||||
uses: nixbuild/nix-quick-install-action@master
|
||||
|
||||
- name: Sync repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: cachix/cachix-action@v14
|
||||
with:
|
||||
name: cything
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
useDaemon: false
|
||||
installCommand: nix profile install nixpkgs#cachix
|
||||
|
||||
- name: Restore and cache Nix store
|
||||
uses: nix-community/cache-nix-action@v5.1.0
|
||||
with:
|
||||
|
@ -64,13 +66,11 @@ jobs:
|
|||
|
||||
- name: setup attic
|
||||
run: |
|
||||
nix profile install nixpkgs#attic
|
||||
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||
attic use main
|
||||
nix run github:zhaofengli/attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||
|
||||
- run: |
|
||||
nix build -L .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
|
||||
attic push main result
|
||||
nix run github:zhaofengli/attic push main result
|
||||
|
||||
build-homes:
|
||||
strategy:
|
||||
|
@ -94,17 +94,14 @@ jobs:
|
|||
remove-codeql: 'true'
|
||||
remove-docker-images: 'true'
|
||||
build-mount-path: /nix
|
||||
|
||||
- uses: nixbuild/nix-quick-install-action@master
|
||||
|
||||
- name: Sync repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: cachix/cachix-action@v14
|
||||
with:
|
||||
name: cything
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
useDaemon: false
|
||||
installCommand: nix profile install nixpkgs#cachix
|
||||
|
||||
- name: Restore and cache Nix store
|
||||
uses: nix-community/cache-nix-action@v5.1.0
|
||||
with:
|
||||
|
@ -125,10 +122,8 @@ jobs:
|
|||
|
||||
- name: setup attic
|
||||
run: |
|
||||
nix profile install nixpkgs#attic
|
||||
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||
attic use main
|
||||
nix run github:zhaofengli/attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||
|
||||
- run: |
|
||||
nix build -L .#homeConfigurations."${{ matrix.home }}".activationPackage
|
||||
attic push main result
|
||||
nix run github:zhaofengli/attic push main result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue