From d48ab1b30a4b6c093c2d7ff27dfb0b6d7a2bafdd Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 20 Mar 2024 08:12:19 -0400 Subject: nix: naersk -> rustPlatform --- nix/deployment.nix | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 nix/deployment.nix (limited to 'nix/deployment.nix') 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"; - }; - }; -} -- cgit v1.2.3