Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use flake ./tools/nix
use flake ./tools/nix --no-pure-eval
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ __pycache__/
*.py[cod]
*$py.class

# Direnv cache
# Direnv/Devenv cache
.direnv
.devenv


# Distribution / packaging
Expand Down
23 changes: 23 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
set positional-arguments
set dotenv-load
set shell := ["bash", "-cue"]
root_dir := `git rev-parse --show-toplevel`
flake_dir := root_dir / "tools/nix"

# Manage container images.
mod image 'tools/just/image.just'
Expand All @@ -21,6 +23,11 @@ get-version:
| tr -d '"'


alias dev := develop
# Enter a development shell.
develop:
just nix-develop default

# Set up python environment.
setup:
@echo "🔧 Setting up python environment"
Expand Down Expand Up @@ -65,3 +72,19 @@ deploy:
# Generate changelog
changelog *args:
@git-cliff -l -c pyproject.toml {{args}}

## Nix Stuff ==================================================================
# Show all packages configured in the Nix `flake.nix`.
nix-list *args:
cd tools/nix && nix flake --no-pure-eval show

# Enter the Nix `devShell` with name `$1` and execute the command `${@:2}` (default command is '$SHELL')
[private]
nix-develop *args:
#!/usr/bin/env bash
set -eu
shell="$1"; shift 1;
args=("$@") && [ "${#args[@]}" != 0 ] || args="$SHELL"
nix develop --no-pure-eval --accept-flake-config \
"{{flake_dir}}#$shell" --command "${args[@]}"
## ============================================================================
244 changes: 232 additions & 12 deletions tools/nix/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading