feat: initail commit

This commit is contained in:
uttarayan21
2025-08-15 16:28:28 +05:30
commit f0dce3f233
16 changed files with 2453 additions and 0 deletions

73
flake.nix Normal file
View File

@@ -0,0 +1,73 @@
{
description = "Hyprmonitors - Hyprland monitor control server";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
rust-overlay,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = ["rust-src" "rust-analyzer"];
};
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
rustToolchain
pkg-config
openssl
curl
jq
];
shellHook = ''
echo "Hyprmonitors development environment"
echo "Rust version: $(rustc --version)"
echo ""
echo "Available commands:"
echo " cargo build - Build the project"
echo " cargo run - Run the server"
echo " cargo test - Run tests"
echo " ./examples.sh - Run API examples"
echo ""
'';
RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library";
};
packages.default = pkgs.rustPlatform.buildRustPackage {
pname = "hyprmonitors";
version = "0.1.0";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
buildInputs = with pkgs; [
openssl
pkg-config
];
meta = with pkgs.lib; {
description = "Hyprland monitor control server";
homepage = "https://github.com/your-username/hyprmonitors";
license = licenses.mit;
maintainers = [];
};
};
});
}