init
This commit is contained in:
commit
8daedbd5b6
13 changed files with 3135 additions and 0 deletions
42
flake.nix
Normal file
42
flake.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
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";
|
||||
};
|
||||
|
||||
nixosModules.default = import ./module.nix self;
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
rustToolchain
|
||||
pkgs.postgresql
|
||||
pkgs.pkg-config
|
||||
pkgs.openssl
|
||||
pkgs.sqlx-cli
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue