nix: move dev outputs to subflake
This commit is contained in:
parent
3503dda44d
commit
921540e249
18 changed files with 461 additions and 331 deletions
25
nix/dev/docker.nix
Normal file
25
nix/dev/docker.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue