WIP
This commit is contained in:
@@ -46,7 +46,28 @@
|
||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||
LC_TIME = "nl_NL.UTF-8";
|
||||
};
|
||||
system.activationScripts."stremio-mpv-flatpak-patch" = {
|
||||
text = ''
|
||||
# 1. Provide the symlink where Stremio's player engine queries
|
||||
mkdir -p /usr/bin
|
||||
ln -sf /run/current-system/sw/bin/mpv /usr/bin/mpv
|
||||
|
||||
# 2. Locate and patch the runtime server.js file inside the active Flatpak installation
|
||||
TARGET_FILE="/var/lib/flatpak/app/com.stremio.Stremio/current/active/files/opt/stremio/server.js"
|
||||
|
||||
if [ -f "$TARGET_FILE" ]; then
|
||||
# Make sure the file is writable momentarily for the patch
|
||||
chmod +w "$TARGET_FILE"
|
||||
|
||||
# Inject the flatpak-spawn sequence into the linux player profile
|
||||
sed -i 's|linux:{path:\["\/usr\/bin\/mpv"\]|linux:{path:["/usr/bin/flatpak-spawn"],args:["--host","/usr/bin/mpv"]|g' "$TARGET_FILE"
|
||||
sed -i 's|linux:{path:\["mpv"\]|linux:{path:["/usr/bin/flatpak-spawn"],args:["--host","/usr/bin/mpv"]|g' "$TARGET_FILE"
|
||||
|
||||
# Restore permissions
|
||||
chmod -w "$TARGET_FILE"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
services = {
|
||||
# Enable Gnome Session
|
||||
displayManager.gdm.enable = true;
|
||||
@@ -59,6 +80,7 @@
|
||||
|
||||
displayManager.cosmic-greeter.enable = false;
|
||||
displayManager.defaultSession = "gnome";
|
||||
# Clear the sandbox restriction dynamically
|
||||
|
||||
xserver = {
|
||||
enable = true; # Enable the deprecated X11 teletype terminal connection system.
|
||||
|
||||
Reference in New Issue
Block a user