From 5004ce8353961a282616afba892cbe09ca530b75 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 18 Jun 2024 10:45:51 -0500 Subject: [PATCH] use hyprland nixosModule --- flake.lock | 44 ++++++++++---------- lib/checks.nix | 4 +- lib/default.nix | 1 + modules/desktop/window-managers/hyprland.nix | 15 ++----- 4 files changed, 30 insertions(+), 34 deletions(-) diff --git a/flake.lock b/flake.lock index c29d432..1edf5a7 100644 --- a/flake.lock +++ b/flake.lock @@ -305,11 +305,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1718633685, - "narHash": "sha256-dAuZ6mIIVQraN1PnCe12Qwdcs/Nvfe/zfSy45ED5aso=", + "lastModified": 1718723174, + "narHash": "sha256-cPIOblG2H8Z934FPeuU0I6kI1Ke8ZbF330Nq/hTJ2uU=", "ref": "refs/heads/main", - "rev": "a9c7a0830fd9a8b9fc4065f1cd654efd1326691a", - "revCount": 4856, + "rev": "236150b3c5227bbfbe46d2610c739a386afdca1f", + "revCount": 4859, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland/" @@ -630,11 +630,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1718470009, - "narHash": "sha256-VBeDG3we0bkbFWMyZy+wjUkmeDN58pGFzw1dQCTeDV8=", + "lastModified": 1718710563, + "narHash": "sha256-O4rrM0Bkh3IRe8D600iniQ52QTmlnuTSp2KyXV7C2jE=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "e0a970cbb8c3af05c80ef48a336ad91efd9b2bf6", + "rev": "2fb93bea657ad99a7005ef601c67cb2820560a41", "type": "github" }, "original": { @@ -682,11 +682,11 @@ "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1718630464, - "narHash": "sha256-GXuN6MmzNomxT9VOEFu4iwP1kRTJ7F3/HdOzeDGPE1c=", + "lastModified": 1718716858, + "narHash": "sha256-+MitVExoNGnT4rlO0bMKDUKVFXsUjTvq0x2QPTvKQkg=", "owner": "nix-community", "repo": "nixpkgs-wayland", - "rev": "4a3b27cc9526208686896d0ef01c7bb67a47b91f", + "rev": "6b09276c557dd29bb043abb472007dc4a1f4f470", "type": "github" }, "original": { @@ -745,11 +745,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1717696253, - "narHash": "sha256-1+ua0ggXlYYPLTmMl3YeYYsBXDSCqT+Gw3u6l4gvMhA=", + "lastModified": 1718437845, + "narHash": "sha256-ZT7Oc1g4I4pHVGGjQFnewFVDRLH5cIZhEzODLz9YXeY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9b5328b7f761a7bbdc0e332ac4cf076a3eedb89b", + "rev": "752c634c09ceb50c45e751f8791cb45cb3d46c9e", "type": "github" }, "original": { @@ -761,11 +761,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1718428119, - "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=", + "lastModified": 1718543737, + "narHash": "sha256-e8S/ODM1vkKHIexSVn9nIvne7vRO5M+35VAq/6JOYto=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5", + "rev": "683aa7c4e385509ca651d49eeb35e58c7a1baad6", "type": "github" }, "original": { @@ -793,11 +793,11 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1718318537, - "narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", + "lastModified": 1718530797, + "narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", + "rev": "b60ebf54c15553b393d144357375ea956f89e9a9", "type": "github" }, "original": { @@ -1169,11 +1169,11 @@ ] }, "locked": { - "lastModified": 1718624172, - "narHash": "sha256-ZWrhjpNX6WSdjnSV8/JTaSLLqY4VqRp9ql16DldcGYk=", + "lastModified": 1718673535, + "narHash": "sha256-KCHMePFrijSscQt6A4rtRJxciOaQXgHyGpqi9dzdy8E=", "owner": "Cloudef", "repo": "zig2nix", - "rev": "26b1364329ffb4c910da43c53f6be27b140723de", + "rev": "60a6e8d97759da986a488528d86548f611c89edb", "type": "github" }, "original": { diff --git a/lib/checks.nix b/lib/checks.nix index 9ed64f0..fea056f 100644 --- a/lib/checks.nix +++ b/lib/checks.nix @@ -17,9 +17,11 @@ in nativeBuildInputs = [ pkgs.pixi pkgs.swww - pkgs.xdg-desktop-portal-hyprland pkgs.nixVersions.stable + inputs.hyprland.packages.${pkgs.system}.default + inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland + inputs.tsm.packages.${pkgs.system}.default inputs.hyprman.packages.${pkgs.system}.default diff --git a/lib/default.nix b/lib/default.nix index 4f8e0f5..239d5cc 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -33,6 +33,7 @@ let ../modules/oizys.nix ../overlays inputs.lix-module.nixosModules.default + inputs.hyprland.nixosModules.default ] ++ filter isNixFile (listFilesRecursive (../. + "/hosts/${hostName}")); specialArgs = { inherit diff --git a/modules/desktop/window-managers/hyprland.nix b/modules/desktop/window-managers/hyprland.nix index 4f76939..d4e1c5c 100644 --- a/modules/desktop/window-managers/hyprland.nix +++ b/modules/desktop/window-managers/hyprland.nix @@ -6,18 +6,11 @@ enabled, ... }: -# let -# lock = pkgs.writeShellApplication { -# name = "lock"; -# runtimeInputs = with pkgs; [swaylock]; -# text = '' -# swaylock -c 1e1e2e -# ''; -# }; + mkOizysModule config "hyprland" { - programs.hyprland = enabled // { - package = inputs.hyprland.packages.${pkgs.system}.default; - }; + programs.hyprland = enabled; #// { + # package = inputs.hyprland.packages.${pkgs.system}.default; + # }; security.pam.services.swaylock = { }; # Optional, hint electron apps to use wayland: environment.sessionVariables.NIXOS_OZONE_WL = "1";