Getting really weird behavior. I was referencing the VLC package straight from nixpkgs but decided to make a wrapper for it to set QT_SCALE_FACTOR. The wrapper works perfectly, but I only get it if run from shell. When launching from Plasma it oens open unscaled, so I looked at the application entry and it’s pointing to a different path.
I’ve tried:
- rebooting
- confirmed I’m not referencing the pkgs.vlc anywhere else.
I can manually change it, but I’d like to know what’s causing this.
The only other thing I can think to try is deleting all old generations, which I can’t do till I finish and test a bunch of other changes I’m in the middle of making
> lsa $(which vlc)
lrwxrwxrwx 1 root root 55 Dec 31 1969 /run/current-system/sw/bin/vlc -> /nix/store/qm1gh8baz2bxq2zl38ra65ibr7rqixpi-vlc/bin/vlc
The wrapper
wrap-vlc = config.mynix.desktop.packs.vlc-qt-scale != null;
vlc-scaled-wrapper = pkgs.symlinkJoin {
name = "vlc";
paths = [ pkgs.vlc];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/vlc --set QT_SCALE_FACTOR ${builtins.toString config.mynix.desktop.packs.vlc-qt-scale}
'';
};
How I’m applying it
environment.systemPackages = with pkgs; [
(if wrap-vlc then vlc-scaled-wrapper else vlc)
];