From 54924cb1314f6925dad73922dc97753e589f2494 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 1 Aug 2024 10:53:55 -0300 Subject: [PATCH] hyprland: use git version --- flake.nix | 4 +++- nixos.nix | 27 +++++++++++++++++++++++---- programs/hyprland/default.nix | 2 +- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 0609f41..fec26b5 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,8 @@ url = "github:Gerg-L/spicetify-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; }; outputs = @@ -22,7 +24,7 @@ pkgs = nixpkgs.legacyPackages.${system}; in { - nixosConfigurations."nixos" = + nixosConfigurations.wizdesk = let specialArgs = inputs; modules = [ ./nixos.nix ]; diff --git a/nixos.nix b/nixos.nix index 9310348..729383e 100644 --- a/nixos.nix +++ b/nixos.nix @@ -2,8 +2,16 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: +{ + config, + pkgs, + hyprland, + ... +}: +let + hyprland-pkgs = hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}; +in { ## ## NIXOS ## @@ -39,6 +47,12 @@ nix.optimise.automatic = true; nix.settings.auto-optimise-store = true; + # Enable Hyprland's cachix + nix.settings.substituters = [ "https://hyprland.cachix.org" ]; + nix.settings.trusted-public-keys = [ + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + ]; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave @@ -243,14 +257,15 @@ }; # Enable Hyprland - programs.hyprland.enable = true; + programs.hyprland = { + enable = true; + package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + }; # Enable XDG Desktop Portals. xdg.portal = { enable = true; - extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ]; - config = { common = { default = [ "hyprland" ]; @@ -269,6 +284,9 @@ enable = true; enable32Bit = true; + package = hyprland-pkgs.mesa.drivers; + package32 = hyprland-pkgs.pkgsi686Linux.mesa.drivers; + extraPackages = with pkgs; [ rocm-opencl-icd # OpenGL hwa rocm-opencl-runtime @@ -319,6 +337,7 @@ # Enable Steam. programs.steam = { enable = true; + remotePlay.openFirewall = true; localNetworkGameTransfers.openFirewall = true; # ^ Enables so we can transfer games to other computers in the network. diff --git a/programs/hyprland/default.nix b/programs/hyprland/default.nix index c3b26af..59e0360 100644 --- a/programs/hyprland/default.nix +++ b/programs/hyprland/default.nix @@ -261,7 +261,7 @@ # Passthrough binds bind = SHIFT CTRL, F12, pass, ^(com.obsproject.Studio)$ - # Window rules + # Window rules for xwaylandvideobridge windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$ windowrulev2 = noanim,class:^(xwaylandvideobridge)$ windowrulev2 = nofocus,class:^(xwaylandvideobridge)$