project: apply formatting

This commit is contained in:
Nojus 2025-07-18 01:29:03 +02:00
parent 641212e569
commit de8696f83f
3 changed files with 31 additions and 22 deletions

View file

@ -1,14 +1,15 @@
{ lib {
, fetchFromGitHub lib,
, cmake fetchFromGitHub,
, ninja cmake,
, vulkan-headers ninja,
, vulkan-loader vulkan-headers,
, llvmPackages vulkan-loader,
, spirv-headers llvmPackages,
}: let spirv-headers,
}:
in llvmPackages.stdenv.mkDerivation { llvmPackages.stdenv.mkDerivation {
pname = "lsfg-vk"; pname = "lsfg-vk";
version = "unstable-2025-07-14-83b869b"; version = "unstable-2025-07-14-83b869b";
@ -40,6 +41,7 @@ in llvmPackages.stdenv.mkDerivation {
]; ];
meta = with lib; { meta = with lib; {
description = "Vulkan layer for frame generation (Requires Lossless Scaling install)";
homepage = "https://github.com/PancakeTAS/lsfg-vk/"; homepage = "https://github.com/PancakeTAS/lsfg-vk/";
license = licenses.mit; license = licenses.mit;
platforms = platforms.linux; platforms = platforms.linux;

View file

@ -1,11 +1,13 @@
{ {
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { nixpkgs, ... }: let outputs = { nixpkgs, ... }:
system = "x86_64-linux"; let
pkgs = import nixpkgs { inherit system; }; system = "x86_64-linux";
in { pkgs = import nixpkgs { inherit system; };
packages.${system}.default = pkgs.callPackage ./default.nix {}; in
nixosModules.default = import ./module.nix; {
}; packages.${system}.default = pkgs.callPackage ./default.nix { };
nixosModules.default = import ./module.nix;
};
} }

View file

@ -1,13 +1,18 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.services.lsfg-vk; cfg = config.services.lsfg-vk;
lsfg-vk = pkgs.callPackage ./default.nix {}; lsfg-vk = pkgs.callPackage ./default.nix { };
in in
{ {
options = { options = {
services.lsfg-vk = { services.lsfg-vk = {
enable = lib.mkEnableOption "Lossless Scaling Frame Generation Vulkan layer"; enable = lib.mkEnableOption "Lossless Scaling Frame Generation Vulkan layer";
package = lib.mkOption { package = lib.mkOption {
type = lib.types.package; type = lib.types.package;
description = "The lsfg-vk package to use"; description = "The lsfg-vk package to use";
@ -30,9 +35,9 @@ in
environment.systemPackages = [ cfg.package ]; environment.systemPackages = [ cfg.package ];
# Installs the Vulkan implicit layer system-wide # Installs the Vulkan implicit layer system-wide
environment.etc."vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json".source = environment.etc."vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json".source =
"${cfg.package}/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json"; "${cfg.package}/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json";
environment.sessionVariables.LSFG_DLL_PATH = lib.mkIf (cfg.losslessDLLFile != null) cfg.losslessDLLFile; environment.sessionVariables.LSFG_DLL_PATH = lib.mkIf (cfg.losslessDLLFile != null) cfg.losslessDLLFile;
}; };
} }