nix: move dev outputs to subflake

This commit is contained in:
seth 2024-04-10 01:03:45 -04:00
parent 3503dda44d
commit 921540e249
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
18 changed files with 461 additions and 331 deletions

25
nix/dev/docker.nix Normal file
View file

@ -0,0 +1,25 @@
{withSystem, ...}: {
perSystem = {
lib,
pkgs,
self',
...
}: let
containerFor = arch:
pkgs.dockerTools.buildLayeredImage {
name = "refraction";
tag = "latest-${arch}";
contents = [pkgs.dockerTools.caCertificates];
config.Cmd = [
(lib.getExe self'.packages."refraction-static-${arch}")
];
architecture = withSystem "${arch}-linux" ({pkgs, ...}: pkgs.pkgsStatic.go.GOARCH);
};
in {
packages = {
container-x86_64 = containerFor "x86_64";
container-aarch64 = containerFor "aarch64";
};
};
}