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

Isolate the Evaluator #6

Open
nrdxp opened this issue Aug 23, 2024 · 1 comment
Open

Isolate the Evaluator #6

nrdxp opened this issue Aug 23, 2024 · 1 comment

Comments

@nrdxp
Copy link
Contributor

nrdxp commented Aug 23, 2024

It's quite simple:

#!/usr/bin/env bash

cmd="$(readlink -f "$(command -v "$1")")"

shift

NIX_CONFIG="$(nix config show)"
export NIX_CONFIG

bwrap --ro-bind /nix /nix \
      --bind "$PWD" /work \
      --chdir /work \
      --dev /dev \
      --proc /proc \
      --tmpfs /tmp \
      "$cmd" "$@"

to put the evaluator into a context where it has no access to the host file-system beside the current directory. This example uses bubblewrap, but eka should be smart enough to perform certain operations in isolation in general, while also extending this concept to the future Eos backend.

@nrdxp
Copy link
Contributor Author

nrdxp commented Oct 27, 2024

see the nixec crate for a very rough PoC (unfinished) of the general idea, however this will probably move to Eos eventually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant