Nix flake to build the library for Lossless Scaling's frame generation on NixOS https://github.com/PancakeTAS/lsfg-vk/
Find a file
adisbladis 66f70e571a NixOS module: Remove
With an instruction on how to migrate usage over to `systemPackages`.
2025-08-08 14:01:38 +12:00
.gitignore Initial commit 2025-07-10 15:35:26 +02:00
flake.lock NixOS module: Remove 2025-08-08 14:01:38 +12:00
flake.nix lsfg-vk-ui: init 2025-07-27 02:14:25 +02:00
LICENSE Initial commit 2025-07-10 15:35:26 +02:00
lsfg-vk-ui.nix lsfg-vk(-ui): sync up with nixpkgs pr 2025-07-31 07:04:52 +02:00
lsfg-vk.nix lsfg-vk(-ui): sync up with nixpkgs pr 2025-07-31 07:04:52 +02:00
module.nix NixOS module: Remove 2025-08-08 14:01:38 +12:00
README.md NixOS module: Remove 2025-08-08 14:01:38 +12:00

lsfg-vk-flake

Nix flake for using Lossless Scaling's frame generation on Linux

Important

You need to have Lossless Scaling installed on Steam! In case it is not installed on the default Steam drive, you may want to consider setting the correct path in the lsfg-vk config.

Installation

System-wide (NixOS)

This approach will install an implicit layer to /etc/vulkan/implicit_layer.d/

Add this to your flake inputs, output function and configuration:

inputs = {
  ...
  lsfg-vk-flake.url = "github:pabloaul/lsfg-vk-flake/main";
  lsfg-vk-flake.inputs.nixpkgs.follows = "nixpkgs";
}

outputs = {nixpkgs, lsfg-vk-flake, ...}: {

  nixosConfigurations.hostname = nixpkgs.lib.nixosSystem {
    ...
    environment.systemPackages = [
      lsfg-vk-flake.packages.${system}.lsfg-vk
      lsfg-vk-flake.packages.${system}.lsfg-vk-ui
    ];
  };
}

User install (manual)

  1. Build the library:
nix build
  1. Create the following path in case it does not exist:
mkdir -p $HOME/.local/share/vulkan/implicit_layer.d
  1. Symlink the build results to your $HOME/.local/
cp -ifrsv "$(readlink -f ./result)"/* $HOME/.local/

Usage

Run a Vulkan application with the environment variable ENABLE_LSFG=1 set.

Example:

ENABLE_LSFG=1 vkcube

To confirm that it is working, look for output like this in the terminal: lsfg-vk(...): ...

You can also enable it per game on Steam by adding this to the launch options:

ENABLE_LSFG=1 %COMMAND%

Note

If the environment variable is set but the program doesn't show any lsfg-vk output, you may need to add the application to your lsfg-vk configuration file at ~/.config/lsfg-vk/config.toml. Read more about it in the Wiki