From 6ff9a2158c06abfdbcfd955ef5830588a64d12ff Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Wed, 26 Mar 2025 16:25:36 +0100 Subject: [PATCH] Fix discord --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 5 +++++ modules/home/de/hyprland/default.nix | 9 +++++++-- modules/system/de/hyprland.nix | 12 ++++++++---- users/seb/home.nix | 4 ++-- 5 files changed, 43 insertions(+), 8 deletions(-) diff --git a/flake.lock b/flake.lock index dff42f2..71a2ebb 100644 --- a/flake.lock +++ b/flake.lock @@ -169,6 +169,26 @@ "type": "github" } }, + "home-manager-unstable": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1742996658, + "narHash": "sha256-snxgTLVq6ooaD3W3mPHu7LVWpoZKczhxHAUZy2ea4oA=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "693840c01b9bef9e54100239cef937e53d4661bf", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "hypridle": { "inputs": { "hyprland-protocols": "hyprland-protocols", @@ -416,6 +436,7 @@ "firefox-addons": "firefox-addons", "flake-parts": "flake-parts", "home-manager": "home-manager", + "home-manager-unstable": "home-manager-unstable", "hypridle": "hypridle", "nextcloud-side-menu": "nextcloud-side-menu", "nextcloud-twofactor-totp": "nextcloud-twofactor-totp", diff --git a/flake.nix b/flake.nix index 8b1722e..066fc3f 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + home-manager-unstable = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/home/de/hyprland/default.nix b/modules/home/de/hyprland/default.nix index adbe08f..d9541f4 100644 --- a/modules/home/de/hyprland/default.nix +++ b/modules/home/de/hyprland/default.nix @@ -1,11 +1,15 @@ { config, + inputs, pkgs, - pkgs-unstable, lib, ... }@moduleArgs: { + # Use unstable hyprland module for nullable package + disabledModules = [ "services/window-managers/hyprland.nix" ]; + imports = [ "${inputs.home-manager-unstable}/modules/services/window-managers/hyprland.nix" ]; + options.myConfig.de.hyprland.enable = lib.mkEnableOption "" // { default = moduleArgs.osConfig.myConfig.de.hyprland.enable or false; }; @@ -13,7 +17,8 @@ config = lib.mkIf config.myConfig.de.hyprland.enable { wayland.windowManager.hyprland = { enable = true; - package = pkgs-unstable.hyprland; + package = null; + portalPackage = null; }; home.packages = [ diff --git a/modules/system/de/hyprland.nix b/modules/system/de/hyprland.nix index d737493..28e65b8 100644 --- a/modules/system/de/hyprland.nix +++ b/modules/system/de/hyprland.nix @@ -8,10 +8,14 @@ options.myConfig.de.hyprland.enable = lib.mkEnableOption ""; config = lib.mkIf config.myConfig.de.hyprland.enable { - programs.hyprland = { - enable = true; - package = pkgs-unstable.hyprland; - portalPackage = pkgs-unstable.xdg-desktop-portal-hyprland; + programs = { + hyprland = { + enable = true; + package = pkgs-unstable.hyprland; + portalPackage = pkgs-unstable.xdg-desktop-portal-hyprland; + }; + + xwayland.package = pkgs-unstable.xwayland; }; hardware.graphics = { diff --git a/users/seb/home.nix b/users/seb/home.nix index 2e91ed2..d75ff14 100644 --- a/users/seb/home.nix +++ b/users/seb/home.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, pkgs-unstable, ... }: { imports = [ ../shared-home.nix ]; @@ -31,7 +31,7 @@ pkgs.todoist-electron pkgs.anki - pkgs.discord + pkgs-unstable.discord pkgs.signal-desktop pkgs.element-desktop