1
0
forked from extern/nix-config

meta: Merge srb2 container with wine

This continues the process of reducing the amount of containers in order
to significantly reduce build times.
This commit is contained in:
Donovan Glover 2023-08-31 10:18:27 -04:00
parent a28b33a2d9
commit 41b784ec9b
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
3 changed files with 9 additions and 62 deletions

View File

@ -1,7 +1,6 @@
{ {
imports = [ imports = [
./dev.nix ./dev.nix
./srb2.nix
./wine.nix ./wine.nix
]; ];
} }

View File

@ -1,58 +0,0 @@
{ home-manager, stylix, ... }:
{
containers.srb2 = {
privateNetwork = true;
ephemeral = true;
hostAddress = "192.168.100.10";
localAddress = "192.168.100.11";
bindMounts = {
"/home/user/.srb2" = {
hostPath = "/home/user/containers/srb2";
isReadOnly = false;
};
waylandDisplay = rec {
hostPath = "/run/user/1000";
mountPoint = hostPath;
};
x11Display = rec {
hostPath = "/tmp/.X11-unix";
mountPoint = hostPath;
};
dri = rec {
hostPath = "/dev/dri";
mountPoint = hostPath;
};
};
allowedDevices = [
{
modifier = "rw";
node = "/dev/dri/renderD128";
}
];
config = { pkgs, ... }: {
imports = [
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix
../setup.nix
];
networking.nat.forwardPorts = [
{
destination = "192.168.100.11:5029";
sourcePort = 5029;
}
];
environment.systemPackages = with pkgs; [
srb2
];
};
};
}

View File

@ -60,11 +60,16 @@
destination = "192.168.100.49:39493"; destination = "192.168.100.49:39493";
sourcePort = 39493; sourcePort = 39493;
} }
{
destination = "192.168.100.49:5029";
sourcePort = 5029;
}
]; ];
networking.firewall = { networking.firewall.allowedTCPPorts = [
allowedTCPPorts = [ 39493 ]; 39493
}; 5029
];
systemd.services.sakaya = { systemd.services.sakaya = {
enable = true; enable = true;
@ -92,6 +97,7 @@
rar rar
unrar unrar
iamb iamb
srb2
]; ];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [