summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorjakka <jakka@jakka.su>2025-10-28 15:06:04 +0300
committerjakka <jakka@jakka.su>2025-10-28 15:06:04 +0300
commit3189fa40be5954a7b27b144f052cedf5c5d00633 (patch)
tree87c8c567bbc719767d9789b7105242daed46c494 /flake.nix
parente3497005259d85325bef00989b5d426d176efc46 (diff)
added envrc and nix flake
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..aa1cd5e
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,46 @@
+{
+ 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; };
+ in
+ {
+ devShells.default =
+ with pkgs;
+ mkShell {
+ buildInputs = [
+ lldb
+ openssl
+ pkg-config
+ musl
+ rust-bin.stable.latest.default
+ rust-analyzer
+ nixd
+ nixfmt-rfc-style
+ ];
+ };
+
+ rust-bin.stable.latest.default.override = {
+ targets = [
+ "x86_64-unknown-linux-gnu"
+ "x86_64-unknown-linux-musl"
+ ];
+ };
+ }
+ );
+}