Use deduplicating nix for nix copy operations
This commit is contained in:
parent
abdb70dc83
commit
24530ac9d6
6 changed files with 12 additions and 80 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -31,6 +31,8 @@ jobs:
|
|||
experimental-features = nix-command flakes ca-derivations
|
||||
post-build-hook = ${{ github.workspace }}/scripts/post-build-hook
|
||||
substituters = https://cache.chir.rs/
|
||||
- name: Download patched nix
|
||||
run: nix build github:DarkKirb/nix-packages#nix-s3-dedup
|
||||
- name: Set up secrets
|
||||
run: |
|
||||
echo "$NIX_CACHE_KEY" > ~/cache.key
|
||||
|
@ -39,8 +41,6 @@ jobs:
|
|||
env:
|
||||
NIX_CACHE_KEY: ${{secrets.NIX_CACHE_KEY}}
|
||||
AWS_CREDENTIALS: ${{secrets.AWS_CREDENTIALS}}
|
||||
- name: install jq
|
||||
run: sudo apt install jq
|
||||
- name: Build ${{ matrix.host }}
|
||||
run: |
|
||||
nix build '.#hydraJobs.${{ matrix.host }}'
|
||||
|
|
2
.github/workflows/pr.yml
vendored
2
.github/workflows/pr.yml
vendored
|
@ -17,6 +17,8 @@ jobs:
|
|||
experimental-features = nix-command flakes ca-derivations
|
||||
post-build-hook = ${{ github.workspace }}/scripts/post-build-hook
|
||||
substituters = https://cache.chir.rs/
|
||||
- name: Download patched nix
|
||||
run: nix build github:DarkKirb/nix-packages#nix-s3-dedup
|
||||
- name: Set up secrets
|
||||
run: |
|
||||
echo "$NIX_CACHE_KEY" > ~/cache.key
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
nixpkgs,
|
||||
nixpkgs-noto-variable,
|
||||
nix-packages,
|
||||
nix-hotfix,
|
||||
hydra,
|
||||
...
|
||||
}:
|
||||
|
@ -46,10 +45,12 @@ in {
|
|||
];
|
||||
installCheckPhase = "true";
|
||||
});
|
||||
nix = nix-hotfix.packages.${system}.nix.overrideAttrs (old: rec {
|
||||
nix = nix-packages.packages.${system}.nix-s3-dedup.overrideAttrs (old: rec {
|
||||
postPatchPhase = ''
|
||||
sed 's/getBoolAttr."allowSubstitutes", true./true/' src/libstore/parsed-derivations.cc
|
||||
'';
|
||||
checkPhase = "true";
|
||||
installCheckPhase = "true";
|
||||
});
|
||||
rnix-lsp = with prev;
|
||||
rustPlatform.buildRustPackage rec {
|
||||
|
|
78
flake.lock
78
flake.lock
|
@ -557,22 +557,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lowdown-src_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1633514407,
|
||||
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
|
||||
"owner": "kristapsdz",
|
||||
"repo": "lowdown",
|
||||
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kristapsdz",
|
||||
"repo": "lowdown",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nci": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
|
@ -637,27 +621,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-hotfix": {
|
||||
"inputs": {
|
||||
"lowdown-src": "lowdown-src_2",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs-regression": "nixpkgs-regression_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1657886512,
|
||||
"narHash": "sha256-B9EyDUz/9tlcWwf24lwxCFmkxuPTVW7HFYvp0C4xGbc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nix",
|
||||
"rev": "0b62dab6db3da5b20e62697b14aaaf80f1a2eea6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "2.10.3",
|
||||
"repo": "nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-packages": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_6",
|
||||
|
@ -666,11 +629,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1668674930,
|
||||
"narHash": "sha256-UoEm1oJN4fi82cTStEHvY9X6vh0lGG4qkY1JVs/8vXo=",
|
||||
"lastModified": 1668772245,
|
||||
"narHash": "sha256-71n4+k++tfTfentTJPH/Ob2dt+A78tuvSiPpg+VbS6s=",
|
||||
"owner": "DarkKirb",
|
||||
"repo": "nix-packages",
|
||||
"rev": "ea049a7a5ca88e47011985648e37a3d2e6c19d7f",
|
||||
"rev": "f54d9ebbadb728e749c0175376278cc71729d9d3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -790,22 +753,6 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-regression_2": {
|
||||
"locked": {
|
||||
"lastModified": 1643052045,
|
||||
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1668443372,
|
||||
|
@ -869,22 +816,6 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1657693803,
|
||||
"narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "365e1b3a859281cf11b94f87231adeabbdd878a2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-22.05-small",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1668757747,
|
||||
"narHash": "sha256-OshUzyuoH5UxUGfwe5q/p6A1MdIQaXfJatuHa8hbDUo=",
|
||||
|
@ -970,10 +901,9 @@
|
|||
"hosts-list": "hosts-list",
|
||||
"hydra": "hydra",
|
||||
"invtracker": "invtracker",
|
||||
"nix-hotfix": "nix-hotfix",
|
||||
"nix-packages": "nix-packages",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs-fluffychat": "nixpkgs-fluffychat",
|
||||
"nixpkgs-noto-variable": "nixpkgs-noto-variable",
|
||||
"nur": "nur",
|
||||
|
|
|
@ -5,7 +5,6 @@ rec {
|
|||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nix-hotfix.url = "github:NixOS/nix/2.10.3";
|
||||
home-manager.url = "github:andresilva/home-manager/fix-systemd-services";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
set -euf
|
||||
export IFS=' '
|
||||
/nix/var/nix/profiles/default/bin/nix store sign --key-file /home/runner/cache.key $DRV_PATH
|
||||
/nix/var/nix/profiles/default/bin/nix copy --to 's3://cache-chir-rs?scheme=https&endpoint=s3.us-west-000.backblazeb2.com&secret-key=/home/runner/cache.key&multipart-upload=true&compression=zstd&compression-level=15' $DRV_PATH
|
||||
/nix/var/nix/profiles/default/bin/nix run 'github:DarkKirb/nix-packages#nix-s3-dedup' -- copy --to 's3://cache-chir-rs?scheme=https&endpoint=s3.us-west-000.backblazeb2.com&secret-key=/home/runner/cache.key&multipart-upload=true&compression=zstd&compression-level=15' $DRV_PATH
|
||||
|
|
Loading…
Reference in a new issue