From dee673f2129bda0a5124e0da26a3849c022d9aba Mon Sep 17 00:00:00 2001 From: cnst Date: Sun, 15 Sep 2024 11:29:28 +0200 Subject: [PATCH] nix develop changes --- flake.nix | 2 +- system/dev/default.nix | 22 ++-------------------- system/nix/shell/default.nix | 18 +++++++++++++++--- 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/flake.nix b/flake.nix index 96424778..d9eac47d 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,7 @@ ]; perSystem = {pkgs, ...}: { - devShells = import ./system/nix/shell {inherit pkgs;}; + devShells = import ./system/nix/shell {inherit pkgs inputs;}; formatter = pkgs.alejandra; packages.cleanup-boot = pkgs.buildFHSUserEnv { diff --git a/system/dev/default.nix b/system/dev/default.nix index 6a3ef092..8fb84412 100644 --- a/system/dev/default.nix +++ b/system/dev/default.nix @@ -1,32 +1,15 @@ { - pkgs, inputs, + pkgs, ... }: { nixpkgs.overlays = [inputs.fenix.overlays.default]; environment.systemPackages = with pkgs; [ - (fenix.complete.withComponents [ - "cargo" - "clippy" - "rust-src" - "rustc" - "rustfmt" - ]) - rust-analyzer-nightly - - # Wayland-specific dependencies - wayland # Wayland client library - wayland-protocols # Wayland protocols (essential for building against Wayland) - pkg-config # Helps to manage libraries during compilation - - # Aquamarine: Hyprland's new compositor library - aquamarine # Aquamarine compositor library for Wayland - # Language servers, other utilities and tools gcc + rust-analyzer-nightly lua-language-server nixd - openssl php php84Packages.php-cs-fixer phpactor @@ -38,7 +21,6 @@ marksman pyright nodePackages_latest.intelephense - helix-gpt # Formatters alejandra diff --git a/system/nix/shell/default.nix b/system/nix/shell/default.nix index 3b164928..5da32dd3 100644 --- a/system/nix/shell/default.nix +++ b/system/nix/shell/default.nix @@ -1,7 +1,19 @@ -{pkgs ? import {}, ...}: { +{ + inputs, + pkgs ? import {}, + ... +}: { default = pkgs.mkShell { - NIX_CONFIG = "extra-experimental-features = nix-command flakes"; - RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; + # Add Rust toolchain from Fenix and rust-analyzer-nightly + packages = [ + (inputs.fenix.packages.${pkgs.stdenv.hostPlatform.system}.complete.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + ]) + ]; nativeBuildInputs = with pkgs; [ # Build tools