mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
lutris: add module (#6964)
Add any number of wine packages
Add any number of proton packages
Link runners directly from nix instead of using lutris.
Specify the steam package lutris should use.
Extra packages passed to lutris (mainly since it's often missing essential things, such as umu-launcher)
This commit is contained in:
parent
3c59c5132b
commit
a51598236f
8 changed files with 309 additions and 0 deletions
|
|
@ -378,6 +378,7 @@ import nmtSrc {
|
|||
./modules/programs/kodi
|
||||
./modules/programs/kickoff
|
||||
./modules/programs/looking-glass-client
|
||||
./modules/programs/lutris
|
||||
./modules/programs/mangohud
|
||||
./modules/programs/mpvpaper
|
||||
./modules/programs/ncmpcpp-linux
|
||||
|
|
|
|||
5
tests/modules/programs/lutris/default.nix
Normal file
5
tests/modules/programs/lutris/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
lutris-runners = ./runners-configuration.nix;
|
||||
# lutris-wine = ./wine-configuration.nix;
|
||||
lutris-empty = ./empty.nix;
|
||||
}
|
||||
14
tests/modules/programs/lutris/empty.nix
Normal file
14
tests/modules/programs/lutris/empty.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
programs.lutris.enable = true;
|
||||
nmt.script =
|
||||
let
|
||||
wineRunnersDir = "home-files/.local/share/lutris/runners";
|
||||
runnersDir = "home-files/.config/lutris/runners";
|
||||
in
|
||||
''
|
||||
assertPathNotExists ${wineRunnersDir}/proton
|
||||
assertPathNotExists ${wineRunnersDir}/wine
|
||||
assertPathNotExists ${runnersDir}
|
||||
'';
|
||||
}
|
||||
50
tests/modules/programs/lutris/runners-configuration.nix
Normal file
50
tests/modules/programs/lutris/runners-configuration.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
programs.lutris = {
|
||||
enable = true;
|
||||
runners = {
|
||||
cemu.package = pkgs.cemu;
|
||||
pcsx2.settings = {
|
||||
system.disable_screen_saver = true;
|
||||
runner.executable_path = "${pkgs.pcsx2}/bin/pcsx2-qt";
|
||||
};
|
||||
rpcs3 = {
|
||||
package = pkgs.rpcs3;
|
||||
settings = {
|
||||
system.disable_screen_saver = true;
|
||||
runner.nogui = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script =
|
||||
let
|
||||
runnersDir = "home-files/.config/lutris/runners";
|
||||
expectedCemu = builtins.toFile "cemu.yml" ''
|
||||
cemu:
|
||||
executable_path: '${lib.getExe pkgs.cemu}'
|
||||
'';
|
||||
expectedPcsx2 = builtins.toFile "pcsx2.yml" ''
|
||||
pcsx2:
|
||||
executable_path: '${pkgs.pcsx2}/bin/pcsx2-qt'
|
||||
system:
|
||||
disable_screen_saver: true
|
||||
'';
|
||||
expectedRpcs3 = builtins.toFile "rpcs3.yml" ''
|
||||
rpcs3:
|
||||
executable_path: '${lib.getExe pkgs.rpcs3}'
|
||||
nogui: true
|
||||
system:
|
||||
disable_screen_saver: true
|
||||
'';
|
||||
in
|
||||
''
|
||||
assertFileExists ${runnersDir}/cemu.yml
|
||||
assertFileContent ${runnersDir}/cemu.yml ${expectedCemu}
|
||||
assertFileExists ${runnersDir}/pcsx2.yml
|
||||
assertFileContent ${runnersDir}/pcsx2.yml ${expectedPcsx2}
|
||||
assertFileExists ${runnersDir}/rpcs3.yml
|
||||
assertFileContent ${runnersDir}/rpcs3.yml ${expectedRpcs3}
|
||||
'';
|
||||
}
|
||||
17
tests/modules/programs/lutris/wine-configuration.nix
Normal file
17
tests/modules/programs/lutris/wine-configuration.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
programs.lutris = {
|
||||
enable = true;
|
||||
protonPackages = with pkgs; [ proton-ge-bin ];
|
||||
winePackages = with pkgs; [ wineWow64Packages.full ];
|
||||
};
|
||||
|
||||
nmt.script =
|
||||
let
|
||||
runnersDir = "home-files/.local/share/lutris/runners";
|
||||
in
|
||||
''
|
||||
assertFileExists ${runnersDir}/proton/${lib.toLower pkgs.proton-ge-bin.steamcompattool.name}/proton
|
||||
assertFileExists ${runnersDir}/wine/${lib.toLower pkgs.wineWow64Packages.name}/bin/wine
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue