From a793ff8a13718f30197cfa1e581193598df662f5 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Mon, 24 Jun 2024 11:46:08 -0400 Subject: [PATCH] feat(hypr): add stuff to make development easier --- flake.lock | Bin 65101 -> 65041 bytes flake.nix | Bin 8293 -> 8253 bytes inputs.nix | 7 +++++-- modules/hyprland/default.nix | 4 ++++ modules/hyprland/dev.nix | 18 ++++++++++++++++++ modules/hyprland/hyprexpo.nix | 4 ++-- 6 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 modules/hyprland/dev.nix diff --git a/flake.lock b/flake.lock index 7f7271a0670ce2751d3e907d023c27d74f293dac..3450ad3a67ce3c515eb5cd2abf337ae6b12131a3 100644 GIT binary patch delta 216 zcmV;}04M*=`~#8v1F*3Z1UNA=F_V$eAS-WhZBsWmHvGjw!UO_L!T7LyhfI4EN?FfcSQIbk$qG&N#1Gh;PmV>2=^GdMIi zG&eS8HZWy3VmUB2WigXs0ZWq>6cv*%UIhepE;%lfG1wK8+!Pj*-tZ)o5El%yT@|Z8 zv*=g62a^+3cau)PlfP9slTc>_vR3E;vz}i$Ym*VnJ`iYmaB^&6Ze%TRY;|X8 SZgZ3HRv?pm%L%hs%k?sFZA?=D delta 277 zcmbREhxzOu<_#N#+00E14NNU3Z|s-T3Jgz7H7W254=v933oWZM^UW&>Epc);GBHX_ zEi%s2_9_a_HcBqn_w%2e*d#t#OvFMxB_-9;(!?;uBq`0@BFWMu#oR0@&A==QyE`5R=?&CA!+4Q#U^?Ei*YYF=z7pm`Ws`Ol%4YPiOOn z*gcG!pN8yV-&_=LoUH`cs9TUznx2_gtYoF2lu=nw1eciH5GOKu;VGxh!l(Zk0RVP| BVB7!z diff --git a/flake.nix b/flake.nix index f7fd05774edf6dc66c64ec46f5b5d8fcbd089830..31fe2becb718d96d8be03ecd36d31200ef380469 100644 GIT binary patch delta 49 zcmaFru-9S3Z&t1}1zQEBGCfN@qsbpwRVI6h$!yMGV`bUQ$8E?sc^)^%2Bxl}j1vazxV=;o)TWhQ4P=I9pWl%{9qP4?q*ntX=ad$SvtDdXhz LJe->qcw|KYFGwK} diff --git a/inputs.nix b/inputs.nix index 83472653..4e8f0886 100644 --- a/inputs.nix +++ b/inputs.nix @@ -133,9 +133,12 @@ let submodules = true; }; - hypr-official-plugins = mkHyprDep { + hyprland-plugins = mkHyprDep { owner = "hyprwm"; repo = "hyprland-plugins"; + + # type = "path"; + # path = "/home/matt/git/hyprland-plugins"; }; Hyprspace = mkHyprDep { @@ -264,7 +267,7 @@ let { owner = "Godiesc"; repo = "firefox-gx"; - rev = "dde9941d4bf78b94d76bf06cccb2d1dce5372c56"; + ref = "v.9.2"; } { name = "git-theme-src"; diff --git a/modules/hyprland/default.nix b/modules/hyprland/default.nix index f8e27403..48093950 100644 --- a/modules/hyprland/default.nix +++ b/modules/hyprland/default.nix @@ -65,9 +65,13 @@ in { # HOME-MANAGER CONFIG home-manager.users.${mainUser} = { imports = [ + ./dev.nix + + # Plugins ./hyprgrass.nix ./hyprexpo.nix # ./Hyprspace.nix + ./inputs.nix ./style.nix ]; diff --git a/modules/hyprland/dev.nix b/modules/hyprland/dev.nix new file mode 100644 index 00000000..452d91e9 --- /dev/null +++ b/modules/hyprland/dev.nix @@ -0,0 +1,18 @@ +{pkgs, ...}: { + programs.bash.shellAliases = { + # https://wiki.hyprland.org/Contributing-and-Debugging/#lsp-and-formatting + "mkCMakeFiles" = "cmake -S . -B build/ -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"; + }; + + home.packages = [ + (pkgs.writeShellScriptBin "testChanges" '' + rm -r /home/matt/git/$1/$2/{.cache,build} + nix flake update "$1" + nh os switch + ( + cd "/home/matt/git/$1/$2" + nix develop /home/matt/git/$1 -c cmake -S . -B build/ -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + ) + '') + ]; +} diff --git a/modules/hyprland/hyprexpo.nix b/modules/hyprland/hyprexpo.nix index bf79a303..26227cdc 100644 --- a/modules/hyprland/hyprexpo.nix +++ b/modules/hyprland/hyprexpo.nix @@ -1,10 +1,10 @@ { - hypr-official-plugins, + hyprland-plugins, pkgs, ... }: { wayland.windowManager.hyprland = { - plugins = [hypr-official-plugins.packages.${pkgs.system}.hyprexpo]; + plugins = [hyprland-plugins.packages.${pkgs.system}.hyprexpo]; settings = { plugin = {