aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraxtlos <axtlos@tar.black>2022-07-02 15:07:25 +0200
committeraxtlos <axtlos@tar.black>2022-07-02 15:07:25 +0200
commit89fe2dbb1b3bced5438016e2fb19ec9390c7b2d4 (patch)
treea79b9ae8e3ab2e7420e60fec672d4f0a1030ba34
parent3444eb9046724c70b6f88ce5f78c888aa35f1349 (diff)
downloadflatpaks-89fe2dbb1b3bced5438016e2fb19ec9390c7b2d4.tar.gz
flatpaks-89fe2dbb1b3bced5438016e2fb19ec9390c7b2d4.tar.bz2
Add distrobox
Diffstat (limited to '')
-rw-r--r--io.github.89luca89.distrobox/README.md6
-rw-r--r--io.github.89luca89.distrobox/io.github.89luca89.distrobox.yml30
-rw-r--r--io.github.89luca89.distrobox/podman8
3 files changed, 44 insertions, 0 deletions
diff --git a/io.github.89luca89.distrobox/README.md b/io.github.89luca89.distrobox/README.md
new file mode 100644
index 0000000..ed98e85
--- /dev/null
+++ b/io.github.89luca89.distrobox/README.md
@@ -0,0 +1,6 @@
+# distrobox
+
+this flatpak needs some more setup, the host also needs podman installed.
+
+When creating the distrobox you'll have to do it from inside the flatpak, meaning you first have to run `flatpk run --command=bash io.github.luca.distrobox` and then the usual distrobox create command, which will create the container, however once that's done you can enter the container by just running `flatpak run io.github.luca.distrobox enter ...`
+
diff --git a/io.github.89luca89.distrobox/io.github.89luca89.distrobox.yml b/io.github.89luca89.distrobox/io.github.89luca89.distrobox.yml
new file mode 100644
index 0000000..23dfba5
--- /dev/null
+++ b/io.github.89luca89.distrobox/io.github.89luca89.distrobox.yml
@@ -0,0 +1,30 @@
+app-id: io.github.luca.distrobox
+runtime: org.freedesktop.Platform
+runtime-version: '21.08'
+sdk: org.freedesktop.Sdk
+command: distrobox
+finish-args:
+ - --share=network
+ - --socket=session-bus
+ - --filesystem=home:rw
+ - --share=ipc
+ - --socket=fallback-x11 # not sure why, but gui applications only work when both x11 and fallback-x11 are allowed
+ - --socket=x11
+ - --socket=wayland
+ - --device=all
+# - --filesystem=host-etc:rw
+# - --filesystem=host-os:rw
+
+modules:
+ - name: distrobox
+ buildsystem: simple
+ sources:
+ - type: git
+ url: https://github.com/89luca89/distrobox.git
+ branch: main
+ - type: file
+ path: ./podman
+ build-commands:
+ - chmod +x install
+ - ./install --prefix /app
+ - install -Dm755 ./podman /app/bin/podman
diff --git a/io.github.89luca89.distrobox/podman b/io.github.89luca89.distrobox/podman
new file mode 100644
index 0000000..9e80f42
--- /dev/null
+++ b/io.github.89luca89.distrobox/podman
@@ -0,0 +1,8 @@
+#!/usr/bin/bash
+
+set -x
+
+command="$@"
+command=$(echo "${command}" | sed 's|podman||' | sed 's|--volume /run/host/monitor/host.conf:/etc/host.conf:ro||' | sed 's|--volume /run/host/monitor/hosts:/etc/hosts:ro||' | sed 's|--volume /run/host/monitor/resolv.conf:/etc/resolv.conf:ro||')
+
+flatpak-spawn --host podman $command