Skip to content

Commit

Permalink
try creating /config and /data if they don't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
capslock committed Jan 18, 2024
1 parent 51059fb commit 54afa9a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
p2n = poetry2nix.lib.mkPoetry2Nix {inherit pkgs;};
outDir = "$out/${pkgs.python311Packages.python.sitePackages}";
runScript = pkgs.writeShellScriptBin "run.sh" ''
mkdir -p /config /data
if [ -n "$LECO_CONFIG" ]; then
echo "$LECO_CONFIG" > /config/config.yaml
fi
Expand Down Expand Up @@ -79,11 +80,6 @@
++ models;
pathsToLink = ["/bin" "/etc" "/models"];
};
enableFakechroot = true;
fakeRootCommands = ''
mkdir -p /config
mkdir -p /data
'';
config = {
Cmd = ["${pkgs.bash}/bin/bash" "${runScript}/bin/run.sh"];
Env = [
Expand Down

0 comments on commit 54afa9a

Please sign in to comment.