blob: 7fd379ff67ab838651d1bd2a6fd9f676174e3c30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
{
flake-parts-lib,
withSystem,
...
}: {
imports = [./static.nix];
flake.nixosModules.default = flake-parts-lib.importApply ./module.nix {
inherit withSystem;
};
perSystem = {
lib,
pkgs,
self',
...
}: let
containerFor = arch:
pkgs.dockerTools.buildLayeredImage {
name = "teawiebot";
tag = "latest-${arch}";
contents = [pkgs.dockerTools.caCertificates];
config.Cmd = [
(lib.getExe self'.packages."teawiebot-static-${arch}")
];
architecture = withSystem "${arch}-linux" ({pkgs, ...}: pkgs.pkgsStatic.go.GOARCH);
};
in {
packages = {
container-x86_64 = containerFor "x86_64";
container-aarch64 = containerFor "aarch64";
};
};
}
|