diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix index 21c54bac..00939e82 100644 --- a/modules/gaming/default.nix +++ b/modules/gaming/default.nix @@ -19,6 +19,8 @@ in home.packages = [ playonlinux godot + obs-studio + obs-studio-plugins.wlrobs ]; }; }; diff --git a/modules/virtualisation/default.nix b/modules/virtualisation/default.nix index c97db9d2..4d588622 100644 --- a/modules/virtualisation/default.nix +++ b/modules/virtualisation/default.nix @@ -3,6 +3,8 @@ with lib; let psCfg = config.pub-solar; cfg = config.pub-solar.virtualisation; + doesGaming = config.pub-solar.gaming.enable; + extraObsPlugins = if doesGaming then [ pkgs.obs-studio-plugins.looking-glass-obs ] else [ ]; in { options.pub-solar.virtualisation = { @@ -32,17 +34,26 @@ in virt-manager python38Packages.libvirt gvfs - scream edk2 OVMF win-virtio + looking-glass-client + lgcl ]; home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { xdg.dataFile."libvirt/.keep".text = "# this file is here to generate the directory"; + home.packages = extraObsPlugins; }; - systemd.tmpfiles.rules = [ "f /dev/shm/scream-ivshmem 0660 ${psCfg.user.name} kvm" ]; - systemd.user.services.scream-ivshmem-pulse = import ./scream-ivshmem-pulse.service.nix pkgs; + systemd.tmpfiles.rules = [ + "f /dev/shm/looking-glass 0660 ${psCfg.user.name} kvm" + ]; + networking.bridges.virbr1.interfaces = [ ]; + networking.interfaces.virbr1 = { + ipv4.addresses = [ + { address = "192.168.123.1"; prefixLength = 24; } + ]; + }; }; } diff --git a/modules/virtualisation/scream-ivshmem-pulse.service.nix b/modules/virtualisation/scream-pulse.service.nix similarity index 100% rename from modules/virtualisation/scream-ivshmem-pulse.service.nix rename to modules/virtualisation/scream-pulse.service.nix diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 69601b10..71321f81 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -15,12 +15,16 @@ channels: final: prev: { nomad rage signal-desktop + tdesktop starship deploy-rs tdesktop xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-wlr + obs-studio + obs-studio-plugins + looking-glass-client ; diff --git a/pkgs/default.nix b/pkgs/default.nix index 3b2f306b..312e685f 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -4,6 +4,7 @@ with final; { sources = prev.callPackage (import ./_sources/generated.nix) { }; # then, call packages with `final.callPackage` import-gtk-settings = writeShellScriptBin "import-gtk-settings" (import ./import-gtk-settings.nix final); + lgcl = writeShellScriptBin "lgcl" (import ./lgcl.nix final); mailto-mutt = writeShellScriptBin "mailto-mutt" (import ./mailto-mutt.nix final); mopidy-jellyfin = import ./mopidy-jellyfin.nix final; mu = writeShellScriptBin "mu" (import ./mu.nix final); diff --git a/pkgs/lgcl.nix b/pkgs/lgcl.nix new file mode 100644 index 00000000..4ef2dac9 --- /dev/null +++ b/pkgs/lgcl.nix @@ -0,0 +1,3 @@ +self: with self; '' + ${self.looking-glass-client}/bin/looking-glass-client -f /dev/shm/looking-glass input:ignoreWindowsKeys=yes input:grabKeyboardOnFocus=no +''