From 41b784ec9b0fd619d968bfc9c2ff5d022cddab91 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Thu, 31 Aug 2023 10:18:27 -0400 Subject: [PATCH] meta: Merge srb2 container with wine This continues the process of reducing the amount of containers in order to significantly reduce build times. --- containers/default.nix | 1 - containers/srb2.nix | 58 ------------------------------------------ containers/wine.nix | 12 ++++++--- 3 files changed, 9 insertions(+), 62 deletions(-) delete mode 100644 containers/srb2.nix diff --git a/containers/default.nix b/containers/default.nix index c7c98ac0..7838c0ec 100644 --- a/containers/default.nix +++ b/containers/default.nix @@ -1,7 +1,6 @@ { imports = [ ./dev.nix - ./srb2.nix ./wine.nix ]; } diff --git a/containers/srb2.nix b/containers/srb2.nix deleted file mode 100644 index c4bc5c67..00000000 --- a/containers/srb2.nix +++ /dev/null @@ -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 - ]; - }; - }; -} diff --git a/containers/wine.nix b/containers/wine.nix index a64d3bae..f731bb58 100644 --- a/containers/wine.nix +++ b/containers/wine.nix @@ -60,11 +60,16 @@ destination = "192.168.100.49:39493"; sourcePort = 39493; } + { + destination = "192.168.100.49:5029"; + sourcePort = 5029; + } ]; - networking.firewall = { - allowedTCPPorts = [ 39493 ]; - }; + networking.firewall.allowedTCPPorts = [ + 39493 + 5029 + ]; systemd.services.sakaya = { enable = true; @@ -92,6 +97,7 @@ rar unrar iamb + srb2 ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [