From 420147c5ca114454828fd63d9c40253512c96fd5 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sun, 10 Nov 2024 16:08:53 -0600 Subject: [PATCH] refactor(nix/hypr): use hyprland from upstream --- flake.nix | 1 + hosts/orion/modules/graphical.nix | 15 ++++++++------- .../dots/.config/hypr/conf/core/appearance.conf | 11 +++++++---- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index ee1091c4..d528ad89 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,7 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + hyprland.url = "github:hyprwm/Hyprland"; wezterm.url = "github:wez/wezterm?dir=nix"; agenix = { url = "github:yaxitech/ragenix"; diff --git a/hosts/orion/modules/graphical.nix b/hosts/orion/modules/graphical.nix index ebf2cf37..5d616022 100644 --- a/hosts/orion/modules/graphical.nix +++ b/hosts/orion/modules/graphical.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ inputs, pkgs, ... }: { # Allow Chromium & Electron apps run natively in wayland environment.sessionVariables.NIXOS_OZONE_WL = "1"; @@ -16,12 +16,13 @@ }; programs.hyprland = { enable = true; - xwayland.enable = true; - }; - xdg = { - autostart.enable = true; - portal.enable = true; + # set the flake package + package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + # make sure to also set the portal package, so that they are in sync + portalPackage = + inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; }; + xdg.autostart.enable = true; hardware.graphics = { enable = true; extraPackages = with pkgs; [ @@ -32,4 +33,4 @@ }; services.qemuGuest.enable = true; services.spice-vdagentd.enable = true; -} \ No newline at end of file +} diff --git a/users/price/dots/.config/hypr/conf/core/appearance.conf b/users/price/dots/.config/hypr/conf/core/appearance.conf index f178fd7b..8af1db94 100644 --- a/users/price/dots/.config/hypr/conf/core/appearance.conf +++ b/users/price/dots/.config/hypr/conf/core/appearance.conf @@ -8,10 +8,13 @@ decoration { new_optimizations = true } - drop_shadow = true - shadow_ignore_window = true - shadow_range = 4 - shadow_render_power = 2 + shadow { + enabled = true + range = 4 + ignore_window = true + render_power = 2 + } + dim_special = 0.05 }