This commit is contained in:
parent
6bdf2e95c1
commit
197463cc08
2 changed files with 19 additions and 3 deletions
|
@ -11,7 +11,7 @@
|
|||
];
|
||||
|
||||
perSystem =
|
||||
{ config, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
treefmt.config = {
|
||||
projectRootFile = ".git/config";
|
||||
|
@ -42,6 +42,18 @@
|
|||
package = config.treefmt.build.wrapper;
|
||||
};
|
||||
};
|
||||
packages.push-to-cache =
|
||||
let
|
||||
allChecks = with self.checks; x86_64-linux // aarch64-linux;
|
||||
checks = builtins.removeAttrs allChecks [ "push-to-cache" ];
|
||||
in
|
||||
pkgs.writeShellScriptBin "push-to-cache.sh" ''
|
||||
attic push $1 --stdin --jobs 64 << EOF
|
||||
${lib.concatStringsSep "\n" (
|
||||
builtins.map (builtins.unsafeDiscardStringContext) (builtins.attrValues checks)
|
||||
)}
|
||||
EOF
|
||||
'';
|
||||
};
|
||||
|
||||
flake.checks =
|
||||
|
@ -49,7 +61,9 @@
|
|||
build = _: nc: nc.config.system.build.toplevel;
|
||||
in
|
||||
{
|
||||
x86_64-linux = lib.mapAttrs build { inherit (self.nixosConfigurations) picard pike kirk; };
|
||||
x86_64-linux = (lib.mapAttrs build { inherit (self.nixosConfigurations) picard pike kirk; }) // {
|
||||
inherit (self.checks.x86_64-linux) push-to-cache;
|
||||
};
|
||||
aarch64-linux = lib.mapAttrs build {
|
||||
inherit (self.nixosConfigurations) sisko; # pbp;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue