Use cachix to publish binary cache

This commit is contained in:
Dave Gallant
2021-02-15 23:28:45 -05:00
parent b26fe96dc6
commit c295d28a9a
3 changed files with 28 additions and 1 deletions

17
.github/workflows/cachix.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: "Build and push to cachix"
on:
pull_request:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v8
with:
name: davegallant
authToken: '${{ secrets.CACHIX_API_KEY }}'
- run: nix-build | cachix push davegallant

View File

@@ -24,7 +24,16 @@
lib' = lib // import ./lib { inherit config lib; };
};
nix.registry = { nixpkgs.flake = nixpkgs; };
nix = {
autoOptimiseStore = true;
binaryCaches = [ "https://davegallant.cachix.org" ];
binaryCachePublicKeys = [
"davegallant.cachix.org-1:SsUMqL4+tF2R3/G6X903E9laLlY1rES2QKFfePegF08="
];
useSandbox = false;
registry = { nixpkgs.flake = nixpkgs; };
trustedUsers = [ "root" "dave" ];
};
nixpkgs.overlays = [ (import ./overlays) ];

View File

@@ -122,6 +122,7 @@
kubernetes-helm
# nix
cachix
nix-index
nixfmt
nixpkgs-fmt