host/home: add containers for proprietary games
This commit is contained in:
parent
2a3784696b
commit
4366a215e6
2 changed files with 24 additions and 4 deletions
|
@ -54,26 +54,42 @@
|
||||||
bindMounts = {
|
bindMounts = {
|
||||||
"${config.services.transmission.settings.download-dir}" = { };
|
"${config.services.transmission.settings.download-dir}" = { };
|
||||||
"/tmp/.X11-unix" = { };
|
"/tmp/.X11-unix" = { };
|
||||||
|
"/run/opengl-driver/lib" = {};
|
||||||
|
"/run/opengl-driver-32/lib" = {};
|
||||||
|
"/dev/kfd" = {};
|
||||||
|
"/dev/dri" = {};
|
||||||
};
|
};
|
||||||
config = { pkgs, ... }: {
|
config = { pkgs, ... }: {
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
||||||
|
users.groups.transmission = config.users.groups.transmission;
|
||||||
users.users.john = {
|
users.users.john = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
home = "/home/john";
|
home = "/home/john";
|
||||||
password = "hello";
|
password = "hello";
|
||||||
extraGroups = [ "pulse-access" ];
|
extraGroups = [ "pulse-access" "transmission" ];
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
# wine
|
||||||
wineWowPackages.stable
|
wineWowPackages.stable
|
||||||
winetricks
|
winetricks
|
||||||
gnome.nautilus
|
# community edition
|
||||||
apulse
|
innoextract
|
||||||
|
fallout-ce
|
||||||
|
fallout2-ce
|
||||||
|
openmw
|
||||||
|
# tools
|
||||||
|
vim
|
||||||
|
unzip
|
||||||
|
wget
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
DISPLAY = ":0";
|
DISPLAY = ":0";
|
||||||
|
PULSE_SERVER = "tcp:127.0.0.1:4713";
|
||||||
|
|
||||||
WINEPREFIX = "/home/john/.wine";
|
WINEPREFIX = "/home/john/.wine";
|
||||||
WINEARCH = "win32";
|
WINEARCH = "win32";
|
||||||
PULSE_SERVER = "tcp:127.0.0.1:4713";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -233,10 +233,13 @@ myManageHook = manageApps
|
||||||
anyOf :: [Query Bool] -> Query Bool
|
anyOf :: [Query Bool] -> Query Bool
|
||||||
anyOf = foldl (<||>) (pure False)
|
anyOf = foldl (<||>) (pure False)
|
||||||
|
|
||||||
|
machine = stringProperty "WM_CLIENT_MACHINE"
|
||||||
role = stringProperty "WM_WINDOW_ROLE"
|
role = stringProperty "WM_WINDOW_ROLE"
|
||||||
isPopup = role =? "pop-up"
|
isPopup = role =? "pop-up"
|
||||||
isPinentry = anyOf [className =? "Gcr-promter", className =? "Pinentry"]
|
isPinentry = anyOf [className =? "Gcr-promter", className =? "Pinentry"]
|
||||||
|
|
||||||
|
isGameMachine = machine =? "games"
|
||||||
|
|
||||||
isWezterm = className =? "org.wezfurlong.wezterm"
|
isWezterm = className =? "org.wezfurlong.wezterm"
|
||||||
isAlacritty = className =? "Alacritty"
|
isAlacritty = className =? "Alacritty"
|
||||||
isTerminal = anyOf [isWezterm, isAlacritty]
|
isTerminal = anyOf [isWezterm, isAlacritty]
|
||||||
|
@ -246,6 +249,7 @@ myManageHook = manageApps
|
||||||
composeOne
|
composeOne
|
||||||
[ -- apps
|
[ -- apps
|
||||||
className =? "Gimp" -?> doFloat,
|
className =? "Gimp" -?> doFloat,
|
||||||
|
isGameMachine -?> doFloat,
|
||||||
-- general
|
-- general
|
||||||
anyOf
|
anyOf
|
||||||
[ resource =? "desktop_window",
|
[ resource =? "desktop_window",
|
||||||
|
|
Loading…
Reference in a new issue