From 8496a112ba5e89c2ea7ca373cb83dd8a34d20479 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Mon, 5 Aug 2024 16:48:59 -0400 Subject: [PATCH] fix(hyprland): use hyprland from nixpkgs, fixing mesa issues --- flake.lock | 320 ++++++++----------------------------- flake.nix | 1 - nixos/hyprland/default.nix | 8 - nixos/hyprland/home.nix | 6 - 4 files changed, 69 insertions(+), 266 deletions(-) diff --git a/flake.lock b/flake.lock index 6aedead..17ac981 100644 --- a/flake.lock +++ b/flake.lock @@ -136,22 +136,6 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -193,7 +177,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1710146030, @@ -211,7 +195,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_4" + "systems": "systems_3" }, "locked": { "lastModified": 1701680307, @@ -227,9 +211,30 @@ "type": "github" } }, + "flake-utils_3": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "git-hooks": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": [ + "nixvim", + "flake-compat" + ], "gitignore": "gitignore", "nixpkgs": [ "nixvim", @@ -326,188 +331,26 @@ ] }, "locked": { - "lastModified": 1718530513, - "narHash": "sha256-BmO8d0r+BVlwWtMLQEYnwmngqdXIuyFzMwvmTcLMee8=", + "lastModified": 1722630065, + "narHash": "sha256-QfM/9BMRkCmgWzrPDK+KbgJOUlSJnfX4OvsUupEUZvA=", "owner": "nix-community", "repo": "home-manager", - "rev": "a1fddf0967c33754271761d91a3d921772b30d0e", + "rev": "afc892db74d65042031a093adb6010c4c3378422", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", "repo": "home-manager", "type": "github" } }, - "hyprcursor": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1718450675, - "narHash": "sha256-jpsns6buS4bK+1sF8sL8AaixAiCRjA+nldTKvcwmvUs=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "66d5b46ff94efbfa6fa3d1d1b66735f1779c34a6", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "hyprcursor": "hyprcursor", - "hyprlang": "hyprlang", - "hyprutils": "hyprutils", - "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_2", - "systems": "systems_2", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1719493676, - "narHash": "sha256-EClgfHBU8jLOQxRrkmEgkHHL22nrvNkPjhABtsOEscE=", - "ref": "refs/heads/main", - "rev": "f2dc48d92f340efe6d4264b92d38378c18a3e1ea", - "revCount": 4892, - "submodules": true, - "type": "git", - "url": "https://github.com/hyprwm/Hyprland" - }, - "original": { - "submodules": true, - "type": "git", - "url": "https://github.com/hyprwm/Hyprland" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "xdph", - "nixpkgs" - ], - "systems": [ - "hyprland", - "xdph", - "systems" - ] - }, - "locked": { - "lastModified": 1714869498, - "narHash": "sha256-vbLVOWvQqo4n1yvkg/Q70VTlPbMmTiCQfNTgcWDCfJM=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "e06482e0e611130cd1929f75e8c1cf679e57d161", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprlang": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1717881852, - "narHash": "sha256-XeeVoKHQgfKuXoP6q90sUqKyl7EYy3ol2dVZGM+Jj94=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "ec6938c66253429192274d612912649a0cfe4d28", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprutils": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1719316102, - "narHash": "sha256-dmRz128j/lJmMuTYeCYPfSBRHHQO3VeH4PbmoyAhHzw=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "1f6bbec5954f623ff8d68e567bddcce97cd2f085", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprwayland-scanner": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1719067853, - "narHash": "sha256-mAnZG/eQy72Fp1ImGtqCgUrDumnR1rMZv2E/zgP4U74=", - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "914f083741e694092ee60a39d31f693d0a6dc734", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "type": "github" - } - }, "master": { "locked": { - "lastModified": 1722605938, - "narHash": "sha256-jEpnC5ChZozKqSQ0PCpd1f+nN7A/7d45MV0I/20gcS8=", + "lastModified": 1722890783, + "narHash": "sha256-02zjysBzuk74mA6uyueC7QnYSHSb8p5G2OJeVXcFz9c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8f3018de97f0b078911e217be698a67c83557b5a", + "rev": "51667289564f065c3e4a56474d15aa0979449ef5", "type": "github" }, "original": { @@ -541,7 +384,7 @@ "inputs": { "flake-compat": "flake-compat", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1719451583, @@ -586,22 +429,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1719075281, - "narHash": "sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a71e967ef3694799d0c418c98332f7ff4cc5f6af", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1713805509, "narHash": "sha256-YgSEan4CcrjivCNO5ZNzhg7/8ViLkZ4CB/GrGBVSudo=", @@ -617,7 +444,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1719426051, "narHash": "sha256-yJL9VYQhaRM7xs0M867ZFxwaONB9T2Q4LnGo1WovuR4=", @@ -632,7 +459,7 @@ "type": "indirect" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { "lastModified": 1718428119, "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=", @@ -648,7 +475,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_5": { "locked": { "lastModified": 1719690277, "narHash": "sha256-0xSej1g7eP2kaUF+JQp8jdyNmpmCJKRpO12mKl/36Kc=", @@ -673,21 +500,21 @@ "home-manager": "home-manager_3", "nix-darwin": "nix-darwin", "nixpkgs": [ - "nixpkgs" + "unstable" ], + "nuschtosSearch": "nuschtosSearch", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1719469291, - "narHash": "sha256-Efir01r7ThPabDBFOygX1UDyerJFHelbRGdMo/VNw14=", + "lastModified": 1722857280, + "narHash": "sha256-b5Bal3cElLrS9UtDN81ljQpOsbqBe/7CdWlTKhlswus=", "owner": "nix-community", "repo": "nixvim", - "rev": "8f52e4d1e34039937efb0ee05825b9963ef29739", + "rev": "5922a48008e5759acb63a12b2de8348ec512760f", "type": "github" }, "original": { "owner": "nix-community", - "ref": "nixos-24.05", "repo": "nixvim", "type": "github" } @@ -707,6 +534,28 @@ "type": "github" } }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722772237, + "narHash": "sha256-3eCYmzeLngX8eutIsTZAG8DIvT/0DWQQxiszTQz8n0s=", + "owner": "NuschtOS", + "repo": "search", + "rev": "aa5f6246565cc9b1e697d2c9d6ed2c842b17fff6", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, "root": { "inputs": { "agenix": "agenix", @@ -714,10 +563,9 @@ "darwin": "darwin_2", "flake-parts": "flake-parts", "home-manager": "home-manager_2", - "hyprland": "hyprland", "master": "master", "nix-vscode-extensions": "nix-vscode-extensions", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "nixvim": "nixvim", "nur": "nur", "rust-overlay": "rust-overlay", @@ -728,7 +576,7 @@ }, "rust-overlay": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1719454714, @@ -761,16 +609,16 @@ }, "systems_2": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -842,7 +690,7 @@ }, "treefmt-nix_2": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1719887753, @@ -890,36 +738,6 @@ "repo": "flake-utils", "type": "github" } - }, - "xdph": { - "inputs": { - "hyprland-protocols": "hyprland-protocols", - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1718619174, - "narHash": "sha256-FWW68AVYmB91ZDQnhLMBNCUUTCjb1ZpO2k2KIytHtkA=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "c7894aa54f9a7dbd16df5cd24d420c8af22d5623", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 8351884..9e243a2 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,6 @@ }; rust-overlay.url = "github:oxalica/rust-overlay"; nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions"; - hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; ags.url = "github:Aylur/ags"; agenix = { url = "github:ryantm/agenix"; diff --git a/nixos/hyprland/default.nix b/nixos/hyprland/default.nix index 268c4c0..16c4c2a 100644 --- a/nixos/hyprland/default.nix +++ b/nixos/hyprland/default.nix @@ -1,12 +1,10 @@ { pkgs, - inputs, lib, config, ... }: let inherit (lib) mkEnableOption mkIf; - pkgs-hyprland = inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}; cfg = config.my.hyprland; in { options.my.hyprland = { @@ -18,14 +16,8 @@ in { programs.hyprland = { enable = true; - package = inputs.hyprland.packages.${pkgs.system}.hyprland; }; - hardware.opengl = { - package = pkgs-hyprland.mesa.drivers; - driSupport32Bit = true; - package32 = pkgs-hyprland.pkgsi686Linux.mesa.drivers; - }; services.gnome.gnome-keyring.enable = true; security.pam.services.greetd.enableGnomeKeyring = true; diff --git a/nixos/hyprland/home.nix b/nixos/hyprland/home.nix index 811bb49..316e316 100644 --- a/nixos/hyprland/home.nix +++ b/nixos/hyprland/home.nix @@ -1,6 +1,5 @@ { pkgs, - inputs, lib, config, ... @@ -8,10 +7,6 @@ inherit (lib) mkEnableOption mkIf; cfg = config.my.hyprland; in { - imports = [ - inputs.hyprland.homeManagerModules.default - ]; - options.my.hyprland = { enable = mkEnableOption "hyprland"; }; @@ -28,7 +23,6 @@ in { wayland.windowManager.hyprland = { enable = true; - package = inputs.hyprland.packages.${pkgs.system}.hyprland; settings = let # No gaps or border when only one window no_gaps_when_only = 1;