Skip to content

Commit

Permalink
Merge pull request #103 from diniamo/flake-best-practices
Browse files Browse the repository at this point in the history
Avoid importing nixpkgs and `with pkgs` in flake
  • Loading branch information
gabm authored Jul 15, 2024
2 parents 84e6b1b + 98d31b2 commit fad68cc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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}
'';
};
}
Expand Down

0 comments on commit fad68cc

Please sign in to comment.