mirror of
https://github.com/gburd/nix-config.git
synced 2024-11-20 10:36:25 +00:00
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{ pkgs, lib, config, ... }:
|
|
let
|
|
steam-with-pkgs = pkgs.steam.override {
|
|
extraPkgs = pkgs: with pkgs; [
|
|
xorg.libXcursor
|
|
xorg.libXi
|
|
xorg.libXinerama
|
|
xorg.libXScrnSaver
|
|
libpng
|
|
libpulseaudio
|
|
libvorbis
|
|
stdenv.cc.cc.lib
|
|
libkrb5
|
|
keyutils
|
|
gamescope
|
|
mangohud
|
|
];
|
|
};
|
|
|
|
monitor = lib.head (lib.filter (m: m.primary) config.monitors);
|
|
steam-session = pkgs.writeTextDir "share/wayland-sessions/steam-sesson.desktop" ''
|
|
[Desktop Entry]
|
|
Name=Steam Session
|
|
Exec=${pkgs.gamescope}/bin/gamescope -W ${toString monitor.width} -H ${toString monitor.height} -O ${monitor.name} -e -- steam -gamepadui
|
|
Type=Application
|
|
'';
|
|
in
|
|
{
|
|
home.packages = with pkgs; [
|
|
steam-with-pkgs
|
|
steam-session
|
|
gamescope
|
|
mangohud
|
|
protontricks
|
|
];
|
|
home.persistence = {
|
|
"/persist/home/gburd" = {
|
|
allowOther = true;
|
|
directories = [
|
|
".factorio"
|
|
".config/Hero_Siege"
|
|
".config/unity3d/Berserk Games/Tabletop Simulator"
|
|
".config/unity3d/IronGate/Valheim"
|
|
".local/share/Tabletop Simulator"
|
|
".local/share/Paradox Interactive"
|
|
".paradoxlauncher"
|
|
{
|
|
# A couple of games don't play well with bindfs
|
|
directory = ".local/share/Steam";
|
|
method = "symlink";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|