From d61e7b8a313ffcaa364f4499f3db97e414384c49 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Tue, 1 Aug 2023 10:31:05 -0400 Subject: [PATCH] meta: Remove gui container Although this was cool, it created some inconveniences that I'd rather not have to deal with. For example, opening a document required manually copying the file to the container mount first. Instead of containerizing a subset of GUI applications, it's likely much easier and more effective to spin up a virtual machine of the current system. That way all GUI applications benefit from virtualization and not simply containerization, which caused issues when certain programs detected that they were already open from the wayland socket. A final benefit of this change is that which container an application is running in is no longer ambiguous. Although it was possible to use custom GTK themes depending on which container an application belonged to, containers for system-installed applications tend to bring a large amount of overhead. Only using containers for applications that deal with untrusted inputs and have a large attack surface seems better in this case. --- containers/gui.nix | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 containers/gui.nix diff --git a/containers/gui.nix b/containers/gui.nix deleted file mode 100644 index 531548e5..00000000 --- a/containers/gui.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ home-manager, stylix, ... }: - -{ - containers.gui = { - privateNetwork = true; - ephemeral = true; - - bindMounts = { - "/mnt" = { - hostPath = "/home/user/containers/gui"; - isReadOnly = false; - }; - - waylandDisplay = rec { - hostPath = "/run/user/1000"; - mountPoint = hostPath; - }; - - x11Display = rec { - hostPath = "/tmp/.X11-unix"; - mountPoint = hostPath; - }; - }; - - config = { pkgs, ... }: { - imports = [ - home-manager.nixosModules.home-manager - stylix.nixosModules.stylix - ../setup.nix - ]; - - environment.systemPackages = with pkgs; [ - audacity # Audio editing - gimp # Video editing - anki # Spaced repetition - sqlitebrowser # SQL - kanjidraw # Kanji draw - libreoffice - ]; - }; - }; -}