Add cachix
continuous-integration/drone/push Build encountered an error Details

pull/1/head
mat ess 2022-10-19 21:03:02 -04:00
parent ec12eede28
commit 7b0b6e53a9
1 changed files with 18 additions and 4 deletions

View File

@ -2,7 +2,18 @@ kind: pipeline
type: docker type: docker
name: default name: default
environment:
NIX: nix --extra-experimental-features 'nix-command flakes ca-derivations'
CACHE_NAME: mat
CACHIX_AUTH_TOKEN:
from_secret: cachix_auth_token
steps: steps:
- name: set up cachix
image: nixos/nix
commands:
- $NIX profile install nixpkgs#cachix
- cachix use $CACHE_NAME
- name: nix build - name: nix build
image: nixos/nix image: nixos/nix
volumes: volumes:
@ -10,10 +21,13 @@ steps:
path: /site path: /site
commands: commands:
- > - >
nix \ $NIX flake archive --json \
--extra-experimental-features nix-command \ | jq -r '.path,(.inputs|to_entries[].value.path)' \
--extra-experimental-features flakes \ | cachix push $CACHE_NAME
build - >
$NIX build \
| jq -r '.[].outputs | to_entries[].value' \
| cachix push $CACHE_NAME
- cp -r result/* /site/ - cp -r result/* /site/
- name: netlify deploy - name: netlify deploy