From 9f116c478bd27ff048470a2d0300ce535a0c3bfc Mon Sep 17 00:00:00 2001 From: SoraTenshi Date: Tue, 18 Jun 2024 12:56:43 +0200 Subject: [PATCH] fix: hyprland --- flake.lock | 263 +++++++++++++++++++++++++++--- flake.nix | 10 +- home/wayland/hyprland/default.nix | 4 +- lib/mknixos.nix | 4 +- 4 files changed, 254 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index ac27e2f..25196b5 100644 --- a/flake.lock +++ b/flake.lock @@ -400,7 +400,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1710146030, @@ -418,7 +418,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1705309234, @@ -436,7 +436,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1710146030, @@ -454,7 +454,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1705309234, @@ -678,6 +678,167 @@ "type": "github" } }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1718368322, + "narHash": "sha256-VfMg3RsnRLQzbq0hFIh1dCM09b5C/F/qPFUOgU/CRi0=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "dd3a853c8239d1c3f3f37de7d2b8ae4b4f3840df", + "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": 1718639631, + "narHash": "sha256-N8bT29SDZUAQcLQsEvUeCFOvV2R69j/dTQtOj5DSgRg=", + "ref": "refs/heads/main", + "rev": "d1340bd1d8eedd274283e0cb2568a3ed67b58c81", + "revCount": 4858, + "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": 1691753796, + "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", + "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": 1718271409, + "narHash": "sha256-8KvVqtApNt4FWTdn1TqVvw00rpqyG9UuUPA2ilPVD1U=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "8e10e0626fb26a14b859b3811b6ed7932400c86e", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1718119275, + "narHash": "sha256-nqDYXATNkyGXVmNMkT19fT4sjtSPBDS1LLOxa3Fueo4=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "1419520d5f7f38d35e05504da5c1b38212a38525", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, "langref": { "flake": false, "locked": { @@ -803,7 +964,7 @@ "inputs": { "flake-compat": "flake-compat_4", "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1718470009, @@ -821,11 +982,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1718699024, - "narHash": "sha256-zQcgclInmA3rzC5x3wm3aaC8f7lH1ND0kYJT2FAlw5U=", + "lastModified": 1718700127, + "narHash": "sha256-qDerTK59sxNm4F4PO6/m9CdnUsll4nAMYvxBlywOkX8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "30f3ff0b5562e66e0db207f091423f827a4c1f39", + "rev": "9c019cce96c230521bb28137d5f17ea9dd1a946a", "type": "github" }, "original": { @@ -886,6 +1047,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1718318537, + "narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1717696253, "narHash": "sha256-1+ua0ggXlYYPLTmMl3YeYYsBXDSCqT+Gw3u6l4gvMhA=", @@ -901,7 +1078,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1718470082, "narHash": "sha256-u2F0MMYE+Efc+ocruTbtU/wWHuYHWcJafp5zJ++n/YE=", @@ -917,7 +1094,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1714912032, "narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=", @@ -933,7 +1110,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1708161998, "narHash": "sha256-6KnemmUorCvlcAvGziFosAVkrlWZGIc6UNT9GUYr0jQ=", @@ -951,11 +1128,11 @@ }, "nur": { "locked": { - "lastModified": 1718697943, - "narHash": "sha256-IzPRhZKflF4AokNQZQW2TsfJkJbHqHmM3a6ecWvngnI=", + "lastModified": 1718700344, + "narHash": "sha256-3KleIvt12hn1m+BnFamOoC329JkyqeImdrXr6XYaf8I=", "owner": "nix-community", "repo": "NUR", - "rev": "b222f6116487a2a0e024f651beb1cd1c0d1755de", + "rev": "ebd94cf2cd7ca8fc85601e2022bfcc339b1de8db", "type": "github" }, "original": { @@ -989,12 +1166,13 @@ "grub2-theme": "grub2-theme", "helix-master": "helix-master", "home-manager": "home-manager", + "hyprland": "hyprland", "neovim-nightly": "neovim-nightly", "nix-cosmic": "nix-cosmic", "nix-flatpak": "nix-flatpak", "nixos-hardware": "nixos-hardware", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-nixos": "nixpkgs-nixos", "nur": "nur", "picom-ibhagwan": "picom-ibhagwan", @@ -1058,7 +1236,7 @@ "flake-compat": "flake-compat_5", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1718634635, @@ -1090,6 +1268,21 @@ } }, "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_3": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1104,7 +1297,7 @@ "type": "github" } }, - "systems_3": { + "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1119,7 +1312,7 @@ "type": "github" } }, - "systems_4": { + "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1134,7 +1327,7 @@ "type": "github" } }, - "systems_5": { + "systems_6": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1171,11 +1364,41 @@ "type": "github" } }, + "xdph": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1718272114, + "narHash": "sha256-KsX7sAwkEFpXiwyjt0HGTnnrUU58wW1jlzj5IA/LRz8=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "24be4a26f0706e456fca1b61b8c79f7486a9e86d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + }, "zig-overlay": { "inputs": { "flake-compat": "flake-compat_6", "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1718670304, diff --git a/flake.nix b/flake.nix index bbbff77..c0d1531 100644 --- a/flake.nix +++ b/flake.nix @@ -50,6 +50,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + hyprland = { + url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + }; + vfio = { url = "github:j-brn/nixos-vfio"; inputs.nixpkgs.follows = "nixpkgs"; @@ -79,7 +83,7 @@ outputs = { self, nixpkgs-nixos, nixpkgs, nur, home-manager, nixos-hardware , sddm-theme, neovim-nightly, zig-overlay, zls-master, grub2-theme , helix-master, picom-ibhagwan, nixos-wsl, darwin, stylix, ags, ags-env - , vfio, nix-flatpak, nix-cosmic, coplandos, }: + , vfio, nix-flatpak, nix-cosmic, coplandos, hyprland, }: let mkDarwin = import ./lib/mkdarwin.nix; mkNixOS = import ./lib/mknixos.nix; @@ -101,7 +105,7 @@ battlestation = mkNixOS "battlestation" { inherit self home-manager helix-master neovim-nightly overlays zls-master picom-ibhagwan sddm-theme grub2-theme nur ags-env - coplandos; + coplandos hyprland; nixpkgs = nixpkgs-nixos; system = "x86_64-linux"; username = "dreamer"; @@ -155,7 +159,7 @@ loqius = mkNixOS "loqius" { inherit self home-manager helix-master neovim-nightly overlays - zls-master picom-ibhagwan sddm-theme grub2-theme nur; + zls-master picom-ibhagwan sddm-theme grub2-theme nur hyprland; nixpkgs = nixpkgs-nixos; system = "x86_64-linux"; username = "dev"; diff --git a/home/wayland/hyprland/default.nix b/home/wayland/hyprland/default.nix index b538d64..6b8ad7f 100644 --- a/home/wayland/hyprland/default.nix +++ b/home/wayland/hyprland/default.nix @@ -1,4 +1,4 @@ -{ self, config, pkgs, ... }: +{ self, config, pkgs, hyprland, ... }: let cursor = config.home.pointerCursor; in { imports = [ ./settings.nix ./binds.nix ]; @@ -40,7 +40,7 @@ in { wayland.windowManager.hyprland = { enable = true; - # package = hyprland.packages.${pkgs.system}.hyprland; + package = hyprland.packages.${pkgs.system}.hyprland; systemd = { enable = true; variables = [ "--all" ]; diff --git a/lib/mknixos.nix b/lib/mknixos.nix index aae6438..1531e91 100644 --- a/lib/mknixos.nix +++ b/lib/mknixos.nix @@ -4,7 +4,7 @@ hostname: , grub2-theme ? null, ags-env ? null, isHardwareMachine ? true, isVM ? false , extraModules ? [ ], # default to an empty list if not provided extraHomeModules ? [ ], efiSysMountPoint ? "/boot", monitors ? [ ] -, coplandos ? null, useStylix ? true, }: +, coplandos ? null, useStylix ? true, hyprland ? null }: let systemSpecificOverlays = [ (final: prev: { @@ -63,7 +63,7 @@ in lib.nixosSystem { useUserPackages = true; extraSpecialArgs = if isHardwareMachine then { inherit self neovim-nightly picom-ibhagwan username ags-env - monitors system; + monitors system hyprland; } else { inherit self neovim-nightly username system; };