Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
description = "devshell";

outputs = { self }:
outputs = { self, nixpkgs }:
let
eachSystem = f:
let
Expand Down Expand Up @@ -32,13 +32,23 @@
legacyPackages = devshell;
devShell = devshell.fromTOML ./devshell.toml;
};
fromTOML = path: eachSystem (system:
let pkgs = import nixpkgs {
inherit system;
overlays = [ (import ./overlay.nix) ];
};
in {
devShell = pkgs.devshell.fromTOML path;
}
);
in
{
defaultTemplate.path = ./template;
defaultTemplate.description = "nix flake new 'github:numtide/devshell'";
# Import this overlay into your instance of nixpkgs
overlay = import ./overlay.nix;
lib = {
inherit fromTOML;
importTOML = import ./nix/importTOML.nix;
};
}
Expand Down
15 changes: 1 addition & 14 deletions template/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@
description = "virtual environments";

inputs.devshell.url = "github:numtide/devshell";
inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, flake-utils, devshell, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system: {
devShell =
let pkgs = import nixpkgs {
inherit system;

overlays = [ devshell.overlay ];
};
in
pkgs.devshell.mkShell {
imports = [ (pkgs.devshell.importTOML ./devshell.toml) ];
};
});
outputs = { devshell, ... }: devshell.lib.fromTOML ./devshell.toml;
}