diff --git a/config/files/usr/share/ublue-os/optfix-symlink.fish b/config/files/usr/share/ublue-os/optfix-symlink.fish new file mode 100755 index 0000000..2c70292 --- /dev/null +++ b/config/files/usr/share/ublue-os/optfix-symlink.fish @@ -0,0 +1,7 @@ +#!/bin/fish + +for dir in (fd --base-directory /usr/lib/opt/ -d 1) + if not test -d /opt/$dir + ln -s /usr/lib/opt/$dir /opt/$dir + end +end diff --git a/config/systemd/user/optfix.service b/config/systemd/user/optfix.service new file mode 100644 index 0000000..01aef15 --- /dev/null +++ b/config/systemd/user/optfix.service @@ -0,0 +1,9 @@ +[Unit] +Description=Symlink all programs installed to opt from /usr/lib/opt to /opt + +[Service] +Type=oneshot +ExecStart=/usr/share/ublue-os/optfix-symlink.fish + +[Install] +WantedBy=default.target diff --git a/recipes/recipe.yml b/recipes/recipe.yml index fd42b86..1d90b74 100644 --- a/recipes/recipe.yml +++ b/recipes/recipe.yml @@ -82,6 +82,10 @@ modules: # Installing different branches of the same Flatpak is not supported. remove: # - org.gnome.eog + - type: systemd + user: + enabled: + - optfix.service - type: fonts fonts: nerd-fonts: