Skip to content

Commit

Permalink
feat: add azure-distrobox service
Browse files Browse the repository at this point in the history
  • Loading branch information
babariviere committed May 19, 2024
1 parent cd4b46a commit ad82b8b
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 8 deletions.
1 change: 0 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ COPY --from=ghcr.io/ublue-os/config:latest /files/ublue-os-update-services /
COPY files /
COPY build.sh /tmp/build.sh
COPY packages /tmp/packages
COPY build /tmp/build

RUN mkdir -p /var/lib/alternatives && \
/tmp/build.sh && \
Expand Down
7 changes: 1 addition & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,14 @@ rpm-ostree override remove opensc
# Installed via flatpak
rpm-ostree override remove firefox firefox-langpacks

### Setup flatpaks

mkdir -p /etc/azure/flatpaks
cp /tmp/build/flatpak-setup /usr/bin/flatpak-setup
cp /tmp/build/flatpak-setup.service /usr/lib/systemd/user/flatpak-setup.service

#### Services

systemctl enable docker.socket
systemctl enable incus.socket
systemctl enable podman.socket
systemctl enable tailscaled.service
systemctl enable -f --global flatpak-setup.service
systemctl enable -f --global azure-distrobox.service

systemctl enable azure-system-setup.service
systemctl enable azure-groups.service
File renamed without changes.
14 changes: 14 additions & 0 deletions files/usr/lib/systemd/user/azure-distrobox.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Update distrobox for current user
Wants=network-online.target
After=network-online.service

[Service]
Type=simple
ExecStart=/usr/libexec/azure-distrobox
Restart=on-failure
RestartSec=30
StartLimitInterval=0

[Install]
WantedBy=default.target
File renamed without changes.
8 changes: 8 additions & 0 deletions files/usr/libexec/azure-distrobox
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

if [ ! -f ~/.config/distrobox.ini ]; then
echo "No distrobox config at ~/.config/distrobox.ini, skipping"
exit 0
fi

distrobox assemble create --file ~/.config/distrobox.ini
2 changes: 1 addition & 1 deletion files/usr/libexec/azure-system-setup
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

mkdir -p /etc/azure
mkdir -p /etc/azure/flatpaks

0 comments on commit ad82b8b

Please sign in to comment.