From 8056d11f3735983291186730a22f71f5e3183f6c Mon Sep 17 00:00:00 2001 From: imxyy_soope_ Date: Sat, 17 Oct 2026 21:40:01 +0800 Subject: [PATCH] flake.nix: decouple devShell --- devShell.nix | 28 ++++++++++++++++++++ flake.nix | 73 +++++++++++++++++++++++++++++++--------------------- 2 files changed, 71 insertions(+), 30 deletions(-) create mode 100644 devShell.nix diff --git a/devShell.nix b/devShell.nix new file mode 100644 index 0000000..1a3f1f6 --- /dev/null +++ b/devShell.nix @@ -0,0 +1,28 @@ +{ pkgs }: +pkgs.mkShell { + packages = with pkgs; [ + (fenix.stable.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + "rust-analyzer" + ]) + gcc + openssl + pkg-config + + nodejs + biome + + sqlite + sqlx-cli + lazysql + + claude-code + + typos + tokei + ]; +} diff --git a/flake.nix b/flake.nix index e3b8326..077849c 100644 --- a/flake.nix +++ b/flake.nix @@ -16,40 +16,53 @@ pkgs = import nixpkgs { inherit system; config.allowUnfree = true; + overlays = [ fenix.overlays.default ]; }; in { - default = pkgs.mkShell rec { - nativeBuildInputs = with pkgs; [ - (fenix.packages.${system}.complete.withComponents [ - "cargo" - "clippy" - "rust-src" - "rustc" - "rustfmt" - "rust-analyzer" - ]) - gcc - openssl - pkg-config - - nodejs - biome - - sqlite - sqlx-cli - lazysql - - gemini-cli - claude-code - - typos - tokei - ]; - buildInputs = [ ]; - LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (nativeBuildInputs ++ buildInputs); - }; + default = import ./devShell.nix { inherit pkgs; }; } ); + # devShells = forAllSystems ( + # system: + # let + # pkgs = import nixpkgs { + # inherit system; + # config.allowUnfree = true; + # }; + # in + # { + # default = pkgs.mkShell rec { + # nativeBuildInputs = with pkgs; [ + # (fenix.packages.${system}.complete.withComponents [ + # "cargo" + # "clippy" + # "rust-src" + # "rustc" + # "rustfmt" + # "rust-analyzer" + # ]) + # gcc + # openssl + # pkg-config + # + # nodejs + # biome + # + # sqlite + # sqlx-cli + # lazysql + # + # gemini-cli + # claude-code + # + # typos + # tokei + # ]; + # buildInputs = [ ]; + # LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (nativeBuildInputs ++ buildInputs); + # }; + # } + # ); }; }