diff --git a/home/home_packages.nix b/home/home_packages.nix index c2c2382..ecb0ac5 100644 --- a/home/home_packages.nix +++ b/home/home_packages.nix @@ -19,6 +19,22 @@ PROXY_PORT="1337" ${pkgs.openssh}/bin/ssh -D "$PROXY_PORT" -q -N "$@" ''; + wrap_sh = let + bubblewrap = pkgs.callPackage ../packages/bubblewrap/default.nix {}; + in + pkgs.writeShellScriptBin "wrap.sh" '' + if ${pkgs.coreutils-full}/bin/test $# -ne 1; then + echo "Usage: $0 " + exit + fi + FULL_PATH=$(${pkgs.coreutils-full}/bin/realpath "$1") + BUBBLEWRAP_DIR="$1" ${bubblewrap}/bin/bwrap \ + --bind / / \ + --dev /dev \ + --overlay-src "$FULL_PATH" \ + --tmp-overlay "$FULL_PATH" \ + "$SHELL" + ''; in { home.packages = with pkgs; [ @@ -116,6 +132,7 @@ in { chromium_discord chromium_teams ssh_proxy + wrap_sh ] ++ [ inputs.swaysw.packages.${system}.swaysw