summaryrefslogtreecommitdiff
path: root/nix/deployment.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2024-03-20 08:12:19 -0400
committerseth <[email protected]>2024-03-20 08:12:19 -0400
commitd48ab1b30a4b6c093c2d7ff27dfb0b6d7a2bafdd (patch)
tree0ab828f6c6738ec495aafbdf29c46c3cc3a5cbfe /nix/deployment.nix
parent0f280dd61c1c138e4c41b715e27fc292f24bbac9 (diff)
nix: naersk -> rustPlatform
Diffstat (limited to 'nix/deployment.nix')
-rw-r--r--nix/deployment.nix52
1 files changed, 0 insertions, 52 deletions
diff --git a/nix/deployment.nix b/nix/deployment.nix
deleted file mode 100644
index 514b307..0000000
--- a/nix/deployment.nix
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- inputs,
- flake-parts-lib,
- withSystem,
- ...
-}: {
- flake.nixosModules.default = flake-parts-lib.importApply ./module.nix {
- inherit withSystem;
- };
-
- perSystem = {
- lib,
- pkgs,
- system,
- config,
- inputs',
- self',
- ...
- }: let
- crossPkgs = with pkgs.pkgsCross; {
- x86_64 = musl64;
- aarch64 = aarch64-multiplatform.pkgsStatic;
- };
-
- teawieFor = arch:
- pkgs.callPackage ./static.nix {
- inherit (self'.packages) teawiebot;
- pkgsStatic = crossPkgs.${arch};
- fenix = inputs'.fenix.packages;
- naersk = inputs.naersk.lib.${system};
- };
-
- containerFor = arch:
- pkgs.dockerTools.buildLayeredImage {
- name = "teawiebot";
- tag = "latest-${arch}";
- contents = [pkgs.dockerTools.caCertificates];
- config.Cmd = [
- (lib.getExe self'.packages."teawiebot-static-${arch}")
- ];
-
- architecture = crossPkgs.${arch}.go.GOARCH;
- };
- in {
- packages = {
- teawiebot-static-x86_64 = teawieFor "x86_64";
- teawiebot-static-aarch64 = teawieFor "aarch64";
- container-x86_64 = containerFor "x86_64";
- container-aarch64 = containerFor "aarch64";
- };
- };
-}