Skip to content

Commit 7c62b50

Browse files
authored
Desktops improvements (#18)
* Update ideas * don't allow long workload names to mess up alignment in status output * another idea * fix completions * Add nested wayland containers to make it easier to configure kms & vnc containers. Add desktop environment niceties * smol fixes * remove invalid cliphist package, improve sunshine error output * small adjustments * update the other wayfire containers too * minor details * add nano, sort package names
1 parent 6bc3d47 commit 7c62b50

43 files changed

Lines changed: 960 additions & 340 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/TROUBLESHOOTING.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -478,18 +478,18 @@ If it fails:
478478

479479
### File locations
480480

481-
| Path | Purpose |
482-
|------|---------|
483-
| `/etc/workloads.d/*.toml` | Workload configs |
484-
| `/run/systemd/generator/workload-*.service` | Generated service files (temporary) |
485-
| `/run/sysusers.d/workload-*.conf` | Generated sysusers configs |
486-
| `/var/lib/workloads/<name>/` | Default home directory |
487-
| `/run/workload-env/workload-*.env` | EnvironmentFiles with XDG_RUNTIME_DIR |
488-
| `/run/user/<uid>/` | Runtime directory (requires linger) |
489-
| `/etc/subuid` `/etc/subgid` | UID/GID mapping ranges |
490-
| `/var/lib/systemd/linger/<user>` | Linger enabled marker |
481+
| Path | Purpose |
482+
|--------------------------------------------------------|---------|
483+
| `/etc/workloads.d/*.toml` | Workload configs |
484+
| `/run/systemd/generator/workload-*.service` | Generated service files (temporary) |
485+
| `/run/systemd/system/workload-*.conf` | Generated sysusers configs |
486+
| `/var/lib/workloads/<name>/` | Default home directory |
487+
| `/run/workload-env/workload-*.env` | EnvironmentFiles with XDG_RUNTIME_DIR |
488+
| `/run/user/<uid>/` | Runtime directory (requires linger) |
489+
| `/etc/subuid` `/etc/subgid` | UID/GID mapping ranges |
490+
| `/var/lib/systemd/linger/<user>` | Linger enabled marker |
491491
| `/usr/share/containers/seccomp-workload-baseline.json` | Hardened seccomp profile (applied by default) |
492-
| `/usr/share/containers/seccomp.json` | Podman default seccomp profile (less strict) |
492+
| `/usr/share/containers/seccomp.json` | Podman default seccomp profile (less strict) |
493493

494494
### Useful commands
495495

docs/ideas.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,4 @@ Start here when unsure what to work on:
166166
Could add configurable schedule, notification on updates, and update log.
167167
- Workloads get LVM provisioned to cap or flex storage
168168
- consider python3-tomlkit for toml edits that preserve comments
169+
- consider using podman api instead of podman cli to bypass all the quoting and escaping mess

hypervisor.Containerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ COPY bin/cosy /usr/bin/
208208
COPY man/cosy.1 /usr/share/man/man1/cosy.1
209209
RUN chmod 0755 /usr/bin/cosy && \
210210
chmod 0644 /usr/share/man/man1/cosy.1 && \
211-
chmod 0644 /usr/lib/systemd/system/emergency.target.d/emergency-access.conf
211+
chmod 0644 /usr/lib/systemd/system/emergency.target.d/emergency-access.conf && \
212+
/usr/bin/cosy completion bash > /usr/share/bash-completion/completions/cosy && \
213+
chmod 0644 /usr/share/bash-completion/completions/cosy
212214

213215
# Define required labels for this bootc image to be recognized as such
214216
LABEL containers.bootc 1

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ build-amd:
134134
podman build \
135135
--env=http_proxy={{proxy}} --env=https_proxy={{proxy}} \
136136
-t localhost/hypervisor-amd:{{tag}} \
137-
-t {{local_registry}}/hypervisor-amd:{{tag}} \
137+
-t {{local_registry}}/hypervisor-amd:latest \
138138
-t localhost/hypervisor-amd:latest \
139139
-f hypervisor-amd.Containerfile .
140140

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# avoids a crash when system dictionary isn't available
12
dictcheck = 0

tests/vm/run-vm-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ if [ -n "$_update_uid" ]; then
650650
# Record current image ID
651651
_old_id=$(cd "$_update_home" && runuser -u "$_update_user" -- \
652652
env XDG_RUNTIME_DIR="/run/user/${_update_uid}" \
653-
podman images --format '{{.ID}}' "192.168.0.64:5000/library/registry:2" 2>/dev/null | head -1)
653+
podman images --format '{{.ID}}' "registry.local:5000/library/registry:2" 2>/dev/null | head -1)
654654

655655
if [ -n "$_old_id" ]; then
656656
pass "update: current image ID recorded (${_old_id:0:12})"

workloadctl/completions/workloadctl-completion.bash

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _workload_ctl_completion() {
1818
# Get list of credential names (without path)
1919
local credentials=""
2020
if [[ -d "$credstore_dir" ]]; then
21-
credentials=$(cd "$credstore_dir" 2>/dev/null && ls -1 2>/dev/null | xargs -n1 basename)
21+
credentials=$(cd "$credstore_dir" 2>/dev/null && ls -1 2>/dev/null)
2222
fi
2323

2424
# First argument: complete commands
@@ -136,18 +136,9 @@ _workload_ctl_completion() {
136136
fi
137137
return 0
138138
;;
139-
ps)
140-
# Complete with --json
141-
if [[ "$cur" == -* ]]; then
142-
COMPREPLY=( $(compgen -W "--json" -- "$cur") )
143-
fi
144-
return 0
145-
;;
146-
list)
139+
ps|list)
147140
# Complete with --json flag
148-
if [[ "$cur" == -* ]]; then
149-
COMPREPLY=( $(compgen -W "--json" -- "$cur") )
150-
fi
141+
COMPREPLY=( $(compgen -W "--json" -- "$cur") )
151142
return 0
152143
;;
153144
create)
@@ -160,8 +151,6 @@ _workload_ctl_completion() {
160151
COMPREPLY=( $(compgen -W "always true false" -- "$cur") )
161152
elif [[ "$prev" == "--network" ]]; then
162153
COMPREPLY=( $(compgen -W "host pasta none" -- "$cur") )
163-
elif [[ "$prev" == "--volume" ]]; then
164-
_filedir
165154
fi
166155
return 0
167156
;;
@@ -258,12 +247,6 @@ _workload_ctl_completion() {
258247
return 0
259248
;;
260249
esac
261-
262-
# Third argument for disable: workload name after --purge
263-
if [[ $cword -eq 3 && "${words[1]}" == "disable" && "${words[2]}" == "--purge" ]]; then
264-
COMPREPLY=( $(compgen -W "$workloads" -- "$cur") )
265-
return 0
266-
fi
267250
}
268251

269252
complete -F _workload_ctl_completion workloadctl

workloadctl/containers/desktop-labwc-kms/Containerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,44 @@ RUN dnf install --setopt=install_weak_deps=False --nodocs -y \
1010
fuzzel \
1111
grim \
1212
htop \
13+
imv \
1314
labwc \
1415
libevdev \
1516
libinput \
1617
libseat \
18+
mako \
1719
mesa-dri-drivers \
1820
mesa-libEGL \
1921
mesa-libGL \
2022
mesa-libgbm \
2123
mesa-vulkan-drivers \
24+
nano \
2225
neovim \
2326
pipewire \
2427
pipewire-alsa \
2528
pipewire-pulseaudio \
2629
procps-ng \
2730
slurp \
2831
sudo \
32+
swappy \
2933
swaybg \
3034
systemd \
3135
systemd-udev \
3236
util-linux \
3337
waybar \
38+
wdisplays \
39+
wf-recorder \
3440
wireplumber \
3541
wl-clipboard \
42+
wlr-randr \
3643
xorg-x11-server-Xwayland \
3744
&& dnf clean all
3845

3946
# Labwc config
4047
COPY --link --chmod=0644 labwc-config/rc.xml /etc/xdg/labwc/rc.xml
4148
COPY --link --chmod=0755 labwc-config/autostart /etc/xdg/labwc/autostart
4249
COPY --link --chmod=0644 labwc-config/waybar-config /etc/xdg/waybar/config
50+
COPY --link --chmod=0644 foot.ini /etc/xdg/foot/foot.ini
4351

4452
# systemd services
4553
COPY --link --chmod=0644 systemd/labwc.service /usr/lib/systemd/system/labwc.service
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[main]
2+
font=Fira Code:size=12
3+
initial-window-size-chars=100x30
4+
pad=8x8
5+
shell=/bin/bash -l
6+
7+
[cursor]
8+
style=beam
9+
10+
[colors]
11+
alpha=0.95

workloadctl/containers/desktop-labwc-kms/labwc-config/autostart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
swaybg -c '#2e3440' &
33
waybar &
4+
mako &
45

56
# Audio — start PipeWire stack under labwc's D-Bus session
67
# SPA's udev-based ALSA enumeration fails in containers (podman's /dev tmpfs

0 commit comments

Comments
 (0)