Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first draft of installing flox from its repo on debian and red hat documentation #33

Open
wants to merge 13 commits into
base: preview
Choose a base branch
from
Open
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
14 changes: 14 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2.1

orbs:
flox: flox/[email protected]

jobs:
build:
machine:
image: ubuntu-2204:current
steps:
- checkout
- flox/install
- flox/activate:
command: mkdocs build
51 changes: 50 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
use flake
# Usage: use_flox [...]
#
# Loads the environment variables from a Flox envrionment
# By default, uses the ".flox" directory to load the envrionment from
# You can also specify a remote envrionment as follows
#
# ```
# use_flox --remote=<owner>/<name>
# ```
# or
# ```
# use_flox --trust --remote=<owner>/<name>
# ```
#
# Where <owner>/<name> is the name of the remote environment on FloxHub
#
# You can also specify another directory to load the environment from
#
# ```
# use_flox --dir=<path>
# ```
#
# Where <path> is the path to a directory containing a ".flox" directory
#
# Custom commands aren't supported, since we use the `flox activate` command to dump and load the environment
#
function use_flox() {
if [[ ! -d ".flox" ]]; then
printf "direnv(use_flox): \`.flox\` directory not found\n" >&2
printf "direnv(use_flox): Did you run \`flox init\` in this directory?\n" >&2
return 1
fi

echo ""
echo "Loading \`floxdocs\` environment ..."
echo ""

direnv_load flox activate "$@" -- "$direnv" dump

if [[ $# == 0 ]]; then
watch_dir ".flox/env/"
watch_file ".flox/env.json"
watch_file ".flox/env.lock"
fi
}

use_flox

watch_file "pyproject.toml"
watch_file "poetry.lock"
4 changes: 4 additions & 0 deletions .flox/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
run/
cache/
lib/
log/
4 changes: 4 additions & 0 deletions .flox/env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "floxdocs",
"version": 1
}
Loading