diff --git a/flake.nix b/flake.nix index d576a60..ac66c8e 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,15 @@ url = "github:different-name/steam-config-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + hyprland.url = "github:hyprwm/Hyprland"; + hyprland-plugins = { + url = "github:hyprwm/hyprland-plugins"; + inputs.hyprland.follows = "hyprland"; + }; + split-monitor-workspaces = { + url = "github:zjeffer/split-monitor-workspaces"; + flake = false; + }; # secrets sops-nix = { diff --git a/hosts/apollo/hyprland.nix b/hosts/apollo/hyprland.nix index 566b557..63aa594 100644 --- a/hosts/apollo/hyprland.nix +++ b/hosts/apollo/hyprland.nix @@ -5,12 +5,15 @@ substituters = ["https://hyprland.cachix.org"]; trusted-substituters = ["https://hyprland.cachix.org"]; trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; + trusted-users = ["root" "@wheel"]; }; programs.hyprland = { enable = true; withUWSM = true; xwayland.enable = true; + package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; }; environment.systemPackages = with pkgs; [ diff --git a/modules/home/nyxerinys/linux/hyprland.nix b/modules/home/nyxerinys/linux/hyprland.nix index 9e54dea..82567af 100644 --- a/modules/home/nyxerinys/linux/hyprland.nix +++ b/modules/home/nyxerinys/linux/hyprland.nix @@ -1,11 +1,22 @@ -{ inputs, ... }: +{ inputs, lib, ... }: { + xdg.configFile."hypr/plugins/split-monitor-workspaces".source = inputs.split-monitor-workspaces; wayland.windowManager.hyprland = { enable = true; # set the Hyprland and XDPH packages to null to use the ones from the NixOS module package = null; portalPackage = null; systemd.variables = ["--all"]; + settings = { + smw = { + _var = (lib.generators.mkLuaInline "require('plugins.split-monitor-workspaces')") + }; + setup_smw = lib.generators.mkLuaInline '' + smw.setup({ + workspace_count = 5 + }) + '' + }; }; } \ No newline at end of file