feat: Support Incus OOTB

This commit is contained in:
Kyle Gospodnetich 2024-01-22 19:01:16 -08:00
parent 06941d5131
commit 7fb4d1d6e8
2 changed files with 23 additions and 0 deletions

View File

@ -464,6 +464,7 @@ RUN /tmp/image-info.sh && \
systemctl enable ublue-update.timer && \
systemctl enable gamescope-workaround.service && \
systemctl enable waydroid-workaround.service && \
systemctl enable incus-workaround.service && \
systemctl enable bazzite-hardware-setup.service && \
systemctl enable tailscaled.service && \
systemctl enable dev-hugepages1G.mount && \

View File

@ -0,0 +1,22 @@
[Unit]
Description=Workaround SELinux issues with Incus...
ConditionPathExists=/usr/bin/incus
ConditionPathExists=/usr/bin/incus-agent
ConditionPathExists=/usr/lib/incus
After=local-fs.target
[Service]
Type=oneshot
ExecStart=/usr/bin/mount --bind -o rw /usr/bin/incus /usr/bin/incus
ExecStart=/usr/bin/mount --bind -o rw /usr/bin/incus-agent /usr/bin/incus-agent
ExecStart=/usr/bin/mount --bind -o rw /usr/lib/incus /usr/lib/incus
ExecStart=/usr/sbin/restorecon -R -v /usr/bin/incus
ExecStart=/usr/sbin/restorecon -R -v /usr/bin/incus-agent
ExecStart=/usr/sbin/restorecon -R -v /usr/lib/incus
ExecStart=/usr/bin/umount /usr/bin/incus
ExecStart=/usr/bin/umount /usr/bin/incus-agent
ExecStart=/usr/bin/umount /usr/lib/incus
RemainAfterExit=true
[Install]
WantedBy=multi-user.target