-
Notifications
You must be signed in to change notification settings - Fork 0
/
games.mod.nix
59 lines (53 loc) · 1.47 KB
/
games.mod.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
personal.modules = [
({pkgs, ...}: {
programs.steam = {
enable = true;
# extest.enable = true;
extraPackages = with pkgs; [
sodi-x-run
gamescope
xwayland-run
];
extraCompatPackages = with pkgs; [
proton-ge-bin
];
};
programs.steam.package = let
x-wrapped = steam:
pkgs.runCommand "x-run-steam" {
inherit (steam) passthru meta;
} ''
cp -r ${steam} $out
# $out/share is a symlink to ${steam}/share
# but since we need to edit its internals, we need to expand it to a real directory
# that can be edited
# first we need to make sure we can remove it
chmod -R +w $out
# then remove, recreate, and populate it
rm $out/share
mkdir $out/share
cp -r ${steam}/share/* $out/share/
# and of course, make sure we can edit the desktop file again
chmod -R +w $out
sed -i 's/Exec=steam/Exec=x-run steam/g' $out/share/applications/steam.desktop
'';
in
x-wrapped pkgs.steam
// {
override = f: x-wrapped (pkgs.steam.override f);
};
})
];
personal.home_modules = [
({pkgs, ...}: {
home.packages = with pkgs; [
# simutrans # borked
prismlauncher
lutris
adwaita-icon-theme
itch
];
})
];
}