host/home: add container for wine games
This commit is contained in:
parent
f5ca68b55c
commit
ebffa75c63
1 changed files with 38 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
{ globalData, pkgs, ... }:
|
||||
{ config, globalData, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
@ -39,4 +39,41 @@
|
|||
};
|
||||
|
||||
programs.sniffnet.enable = true;
|
||||
|
||||
################################################################################
|
||||
# Containers
|
||||
################################################################################
|
||||
|
||||
environment.shellInit = ''
|
||||
[ -n "$DISPLAY" ] && ${pkgs.xorg.xhost}/bin/xhost +local: > /dev/null || true
|
||||
'';
|
||||
|
||||
containers.games = {
|
||||
autoStart = true;
|
||||
bindMounts = {
|
||||
"${config.services.transmission.settings.download-dir}" = { };
|
||||
"/tmp/.X11-unix" = { };
|
||||
};
|
||||
config = { pkgs, ... }: {
|
||||
system.stateVersion = "23.11";
|
||||
users.users.john = {
|
||||
isNormalUser = true;
|
||||
home = "/home/john";
|
||||
password = "hello";
|
||||
extraGroups = [ "pulse-access" ];
|
||||
packages = with pkgs; [
|
||||
wineWowPackages.stable
|
||||
winetricks
|
||||
gnome.nautilus
|
||||
apulse
|
||||
];
|
||||
};
|
||||
environment.sessionVariables = {
|
||||
DISPLAY = ":0";
|
||||
WINEPREFIX = "/home/john/.wine";
|
||||
WINEARCH = "win32";
|
||||
PULSE_SERVER = "tcp:127.0.0.1:4713";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue