mirror of
https://github.com/davegallant/nix-config
synced 2025-08-05 18:53:39 +00:00
Use cachix to publish binary cache
This commit is contained in:
17
.github/workflows/cachix.yml
vendored
Normal file
17
.github/workflows/cachix.yml
vendored
Normal 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
|
11
flake.nix
11
flake.nix
@@ -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) ];
|
||||
|
||||
|
@@ -122,6 +122,7 @@
|
||||
kubernetes-helm
|
||||
|
||||
# nix
|
||||
cachix
|
||||
nix-index
|
||||
nixfmt
|
||||
nixpkgs-fmt
|
||||
|
Reference in New Issue
Block a user