-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nix/modules/launcher): add wrapGAppsHook (#1976)
* fix(nix/modules/launcher): add and make proper use of wrappGAppsHook this fixes an issue where the filechooser doesn't work. there's also a fix for DevTools on non-NixOS environments * add container and scripts for hc-launch testing * fix(nix/modules/hc-launch): add missing deps for devtools
- Loading branch information
Showing
4 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM ubuntu:22.10 | ||
|
||
ARG USERNAME=user | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
# Create the user | ||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ | ||
# | ||
# [Optional] Add sudo support. Omit if you don't need to install software after connecting. | ||
&& apt-get update \ | ||
&& apt-get install -y sudo git \ | ||
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME | ||
|
||
# ******************************************************** | ||
# * Anything else you want to do like clean up goes here * | ||
# ******************************************************** | ||
|
||
# [Optional] Set the default user. Omit if you want to keep the default as root. | ||
USER $USERNAME | ||
|
||
WORKDIR /home/$USERNAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeu | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
podman build --build-arg USERNAME="$USER" --tag ubuntu-nix "${SCRIPT_DIR}" | ||
xhost +si:localuser:"$USER" | ||
podman run -it --rm \ | ||
--userns keep-id \ | ||
--security-opt label=type:container_runtime_t \ | ||
-v "$XAUTHORITY":"$XAUTHORITY":ro \ | ||
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \ | ||
--env XAUTHORITY \ | ||
--env DISPLAY \ | ||
--env NIX_REMOTE="daemon" \ | ||
--env NIX_CONFIG="experimental-features = nix-command flakes" \ | ||
-v /nix/store:/nix/store:ro \ | ||
-v /nix/var/nix/db:/nix/var/nix/db:ro \ | ||
-v /nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro \ | ||
-v "$(readlink "$(which nix)")":/usr/bin/nix:ro \ | ||
-v "${SCRIPT_DIR}"/../..:/home/"$USER"/project \ | ||
--workdir /home/"$USER"/project \ | ||
localhost/ubuntu-nix \ | ||
bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
# TODO: build the hc-launch-test.webhapp file from source | ||
echo pass | nix develop .#holonix --command hc-launch --piped -n1 ./hc-launch-test.webhapp network mdns |