1
Fork 0

Extensible devshell setup

This commit is contained in:
Matei Adriel 2023-04-14 18:12:35 +03:00
parent d60ee39658
commit ecb1325477
No known key found for this signature in database
4 changed files with 25 additions and 10 deletions

4
devshells/default.nix Normal file
View file

@ -0,0 +1,4 @@
args: {
visonum = import ./visonum.nix args;
}

5
devshells/visonum.nix Normal file
View file

@ -0,0 +1,5 @@
# Shell containing the tools I most commonly use for work
{ pkgs, inputs }:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [ purescript spago typescript nodejs ];
}

View file

@ -78,10 +78,17 @@
# Devshell for bootstrapping # Devshell for bootstrapping
# Acessible through 'nix develop' # Acessible through 'nix develop'
devShells = forAllSystems (system: devShells = forAllSystems
let pkgs = nixpkgs.legacyPackages.${system}; (system:
in import ./shell.nix { inherit pkgs; } let
); pkgs = nixpkgs.legacyPackages.${system};
default = import ./shell.nix { inherit pkgs; };
devshells = import ./devshells
{
inherit pkgs; inherit inputs;
};
in
devshells // { inherit default; });
# Custom packages and modifications, exported as overlays # Custom packages and modifications, exported as overlays
overlays = import ./overlays; overlays = import ./overlays;

View file

@ -1,9 +1,8 @@
# Shell for bootstrapping flake-enabled nix and home-manager # Shell for bootstrapping flake-enabled nix and home-manager
# You can enter it through 'nix develop' or (legacy) 'nix-shell' # You can enter it through 'nix develop' or (legacy) 'nix-shell'
{ pkgs ? (import ./nixpkgs.nix) { } }: { { pkgs ? (import ./nixpkgs.nix) { } }:
default = pkgs.mkShell { pkgs.mkShell {
# Enable experimental features without having to specify the argument # Enable experimental features without having to specify the argument
NIX_CONFIG = "experimental-features = nix-command flakes"; NIX_CONFIG = "experimental-features = nix-command flakes";
nativeBuildInputs = with pkgs; [ nix home-manager git ]; nativeBuildInputs = with pkgs; [ nix home-manager git ];
};
} }