36 lines
1.0 KiB
Nix
Raw Permalink Normal View History

2026-04-15 11:49:36 +02:00
{
description = "A minimal dev shell: your first flake";
# Inputs: other flakes this one depends on.
# `nixpkgs` is the main package set. `follows` isn't used here, but you'll
# see it a lot when composing flakes (e.g. `inputs.foo.inputs.nixpkgs.follows = "nixpkgs";`).
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
# Outputs: a function that receives all inputs and returns an attrset.
# The attrset's structure is what `nix` CLI commands look for (e.g. `devShells.<system>.default`).
2026-04-20 11:12:42 +02:00
outputs =
{ nixpkgs, ... }:
2026-04-15 11:49:36 +02:00
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
2026-04-20 11:12:42 +02:00
in
{
2026-04-15 11:49:36 +02:00
# `nix develop` picks this up by default.
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
cowsay
jq
ripgrep
];
# Runs once when you enter the shell.
shellHook = ''
echo "welcome to your first nix dev shell"
cowsay "hello, flakes"
'';
};
};
}