forked from fediversity/fediversity
expose git to button, fixes error executing 'git': No such file or directory
This commit is contained in:
parent
d0b25bf8b7
commit
f37d113dff
3 changed files with 10 additions and 4 deletions
|
|
@ -9,5 +9,10 @@ in
|
|||
{
|
||||
REPO_DIR = toString ../.;
|
||||
# explicitly use nix, as e.g. lix does not have configurable-impure-env
|
||||
NIX_BIN = lib.getExe pkgs.nix;
|
||||
BIN_PATH = lib.makeBinPath [
|
||||
# explicitly use nix, as e.g. lix does not have configurable-impure-env
|
||||
pkgs.nix
|
||||
# nixops error maybe due to our flake git hook: executing 'git': No such file or directory
|
||||
pkgs.git
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,8 +192,8 @@ if user_settings_file is not None:
|
|||
# The correct thing to do here would be using a helper function such as with `get_secret()` that will catch the exception and explain what's wrong and where to put the right values.
|
||||
# Replacing the `USER_SETTINGS_FILE` mechanism following the comment there would probably be a good thing.
|
||||
|
||||
# a dir of nix supporting experimental feature `configurable-impure-env`.
|
||||
nix_bin=env['NIX_BIN']
|
||||
# PATH to expose to launch button
|
||||
bin_path=env['BIN_PATH']
|
||||
# path of the root flake to trigger nixops from, see #94.
|
||||
# to deploy this should be specified, for dev just use a relative path.
|
||||
repo_dir = env["REPO_DIR"]
|
||||
|
|
|
|||
|
|
@ -58,11 +58,12 @@ class ConfigurationForm(LoginRequiredMixin, FormView):
|
|||
# serialize back and forth now we still need to manually inject the dummy user
|
||||
deployment = json.dumps(dummy_user | json.loads(submission))
|
||||
env = {
|
||||
"PATH": settings.bin_path,
|
||||
# pass in form info to our deployment
|
||||
"DEPLOYMENT": deployment,
|
||||
}
|
||||
cmd = [
|
||||
settings.nix_bin,
|
||||
"nix",
|
||||
"develop",
|
||||
# workaround to pass in info to nixops4 thru env vars, tho impure :(
|
||||
"--extra-experimental-features",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue