You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

69 lines
2.0 KiB

{
inputs = {
rlib = {
url = "git+https://gitea.redalder.org/RedAlder/rlib";
flake = true;
};
nixpkgs.url = "nixpkgs";
nixpkgs-unstable.url = "nixpkgs-unstable";
};
outputs = { self, nixpkgs, ... }@inputs:
let
rlib = inputs.rlib.lib {
inherit nixpkgs;
system = "x86_64-linux";
packages = {
nixpkgs = {
config = {};
versions = {
stable = inputs.nixpkgs;
unstable = inputs.nixpkgs-unstable;
};
};
custom = {};
};
self = rlib;
};
pkgs = import nixpkgs {
system = "x86_64-linux";
};
publishOciImage = image: pkgs.runCommandNoCCLocal "${image.name}" {} ''
mkdir -p $out $out/nix-support $out/hydra-companion
ln -s ${image} $out/${image.name}
echo "file binary-dist $out/${image.name}" >> $out/nix-support/hydra-build-products
'';
in
{
hydraJobs = {
build = pkgs.lib.mapAttrsRecursiveCond
(as: !(as ? "type" && as.type == "derivation"))
(name: value: publishOciImage value)
self.dockerImages;
};
dockerImages = with rlib.dockerTools; {
nix = buildLayeredImage (import ./nix);
gitea = buildLayeredImage (import ./gitea);
postgresql = buildLayeredImage (import ./postgresql);
runners = {
concourseVault = buildLayeredImage (import ./runner
{ name = "concourse-vault-runner";
additionalPkgsFn = (nixpkgs:
with nixpkgs.stable;
[ vault
# concourse
]);
});
vaultNomad = buildLayeredImage (import ./runner
{ name = "vault-nomad-runner";
additionalPkgsFn = (nixpkgs:
[ nixpkgs.stable.vault
nixpkgs.unstable.nomad
]);
});
};
};
};
}