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:
|
pull_request:
|
||||||
env:
|
env:
|
||||||
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
|
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:
|
jobs:
|
||||||
build-machines:
|
build-machines:
|
||||||
|
@ -29,21 +37,15 @@ jobs:
|
||||||
remove-codeql: 'true'
|
remove-codeql: 'true'
|
||||||
remove-docker-images: 'true'
|
remove-docker-images: 'true'
|
||||||
build-mount-path: /nix
|
build-mount-path: /nix
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v30
|
uses: nixbuild/nix-quick-install-action@master
|
||||||
with:
|
|
||||||
install_url: https://releases.nixos.org/nix/nix-2.25.4/install
|
|
||||||
extra_nix_config: 'accept-flake-config = true'
|
|
||||||
- name: Sync repository
|
- name: Sync repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
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
|
- name: Restore and cache Nix store
|
||||||
uses: nix-community/cache-nix-action@v5.1.0
|
uses: nix-community/cache-nix-action@v5.1.0
|
||||||
with:
|
with:
|
||||||
|
@ -64,13 +66,11 @@ jobs:
|
||||||
|
|
||||||
- name: setup attic
|
- name: setup attic
|
||||||
run: |
|
run: |
|
||||||
nix profile install nixpkgs#attic
|
nix run github:zhaofengli/attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||||
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
|
||||||
attic use main
|
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
nix build -L .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
|
nix build -L .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
|
||||||
attic push main result
|
nix run github:zhaofengli/attic push main result
|
||||||
|
|
||||||
build-homes:
|
build-homes:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -94,17 +94,14 @@ jobs:
|
||||||
remove-codeql: 'true'
|
remove-codeql: 'true'
|
||||||
remove-docker-images: 'true'
|
remove-docker-images: 'true'
|
||||||
build-mount-path: /nix
|
build-mount-path: /nix
|
||||||
|
|
||||||
- uses: nixbuild/nix-quick-install-action@master
|
- uses: nixbuild/nix-quick-install-action@master
|
||||||
|
|
||||||
- name: Sync repository
|
- name: Sync repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
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
|
- name: Restore and cache Nix store
|
||||||
uses: nix-community/cache-nix-action@v5.1.0
|
uses: nix-community/cache-nix-action@v5.1.0
|
||||||
with:
|
with:
|
||||||
|
@ -125,10 +122,8 @@ jobs:
|
||||||
|
|
||||||
- name: setup attic
|
- name: setup attic
|
||||||
run: |
|
run: |
|
||||||
nix profile install nixpkgs#attic
|
nix run github:zhaofengli/attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||||
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
|
||||||
attic use main
|
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
nix build -L .#homeConfigurations."${{ matrix.home }}".activationPackage
|
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