From 98d31b226f770022d4d84c31fa2b5b9e8bf22c7c Mon Sep 17 00:00:00 2001 From: diniamo Date: Sun, 14 Jul 2024 23:41:06 +0200 Subject: [PATCH] avoid importing nixpkgs and `with pkgs` in flake --- flake.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 90b5e82..e0d552c 100644 --- a/flake.nix +++ b/flake.nix @@ -16,8 +16,8 @@ in { devShells = forEachSystem ( system: let - overlays = [(import rust-overlay)]; - pkgs = import nixpkgs {inherit system overlays;}; + pkgs = nixpkgs.legacyPackages.${system}; + rustPkgs = rust-overlay.packages.${system}; in rec { default = satty; satty = pkgs.mkShell { @@ -30,13 +30,13 @@ libadwaita fontconfig - (rust-bin.stable.latest.default.override { + (rustPkgs.rust.override { extensions = ["rust-src"]; }) ]; - shellHook = with pkgs; '' - export GSETTINGS_SCHEMA_DIR=${glib.getSchemaPath gtk4} + shellHook = '' + export GSETTINGS_SCHEMA_DIR=${pkgs.glib.getSchemaPath pkgs.gtk4} ''; }; }