diff --git a/Containerfile b/Containerfile index 83838de..2583ee2 100644 --- a/Containerfile +++ b/Containerfile @@ -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 && \ diff --git a/build.sh b/build.sh index 293acc0..123fcf5 100755 --- a/build.sh +++ b/build.sh @@ -27,12 +27,6 @@ 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 @@ -40,6 +34,7 @@ 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 diff --git a/build/flatpak-setup b/files/usr/bin/flatpak-setup similarity index 100% rename from build/flatpak-setup rename to files/usr/bin/flatpak-setup diff --git a/files/usr/lib/systemd/user/azure-distrobox.service b/files/usr/lib/systemd/user/azure-distrobox.service new file mode 100644 index 0000000..d8e7a80 --- /dev/null +++ b/files/usr/lib/systemd/user/azure-distrobox.service @@ -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 \ No newline at end of file diff --git a/build/flatpak-setup.service b/files/usr/lib/systemd/user/flatpak-setup.service similarity index 100% rename from build/flatpak-setup.service rename to files/usr/lib/systemd/user/flatpak-setup.service diff --git a/files/usr/libexec/azure-distrobox b/files/usr/libexec/azure-distrobox new file mode 100644 index 0000000..6028222 --- /dev/null +++ b/files/usr/libexec/azure-distrobox @@ -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 diff --git a/files/usr/libexec/azure-system-setup b/files/usr/libexec/azure-system-setup index 4988052..6f83eda 100755 --- a/files/usr/libexec/azure-system-setup +++ b/files/usr/libexec/azure-system-setup @@ -1,3 +1,3 @@ #!/usr/bin/env bash -mkdir -p /etc/azure +mkdir -p /etc/azure/flatpaks