feat: create mymx service

This commit is contained in:
Jet Pham 2026-03-04 12:20:26 -08:00
parent 478af69792
commit ad8cb52169
No known key found for this signature in database
20 changed files with 3152 additions and 1 deletions

40
services/mymx/flake.nix Normal file
View file

@ -0,0 +1,40 @@
{
description = "MyMX webhook receiver service";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, rust-overlay, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
};
rustToolchain = pkgs.rust-bin.nightly.latest.default;
in
{
packages.${system}.default = pkgs.rustPlatform.buildRustPackage {
pname = "mymx-server";
version = "0.1.0";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ pkgs.openssl ];
env.SQLX_OFFLINE = "true";
};
devShells.${system}.default = pkgs.mkShell {
buildInputs = [
rustToolchain
pkgs.postgresql
pkgs.pkg-config
pkgs.openssl
pkgs.sqlx-cli
];
};
};
}