Last active
July 8, 2023 03:50
-
-
Save pbsds/6e1d3f012b2731573711766764816c01 to your computer and use it in GitHub Desktop.
flake shell example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NIX_CONFIG="extra-experimental-features = nix-command flakes" use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "My awesome flake"; | |
# update with `nix flake update` | |
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; | |
#inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
outputs = { self, nixpkgs, ... } @ inputs: let | |
forAllSystems = f: nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: f rec { | |
inherit system; | |
pkgs = nixpkgs.legacyPackages.${system}; | |
lib = nixpkgs.legacyPackages.${system}.lib; | |
}); | |
in { | |
devShells = forAllSystems ({ pkgs, ... }: rec { | |
default = pkgs.mkShell { | |
packages = [ | |
pkgs.bashInteractive | |
]; | |
}; | |
}); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in response to https://lobste.rs/s/xc37sv/nix_shell_template