removed non-functional hyprland module in favour of a symlinked file

This commit is contained in:
2026-08-25 19:16:24 +01:00
parent ac7a0adbf2
commit 036d16cf05
2 changed files with 27 additions and 26 deletions

8
flake.lock generated
View File

@@ -374,11 +374,11 @@
"wshowkeys": "wshowkeys" "wshowkeys": "wshowkeys"
}, },
"locked": { "locked": {
"lastModified": 1787581843, "lastModified": 1787681733,
"narHash": "sha256-cqdct8W+Q7f1BXt9d+G0GMJP9j0wtFDMrf1z/xGU4eI=", "narHash": "sha256-+KuqE3sLF/rSO9QU3ByxPVYhkl3WH9rPOIvZZARK2LM=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "e83ab7a6f808006c62cc9d4d092def098c710bbc", "rev": "31e7c1ccb7b6a0cb396fa57846232ab8c5bd7e81",
"revCount": 64, "revCount": 65,
"type": "git", "type": "git",
"url": "https://git.voidarc.co.uk/voidarc/hypr" "url": "https://git.voidarc.co.uk/voidarc/hypr"
}, },

View File

@@ -10,13 +10,9 @@
inputs', inputs',
... ...
}: {config, ...}: let }: {config, ...}: let
modules = with self.nixosModules; modules = with self.nixosModules; [
[
audio audio
systemTheme systemTheme
]
++ [
inputs.hyprland.inputs.hyprland.nixosModules.default
]; ];
runtimePkgs = self'.packages.hyprland.passthru.runtimePackages; runtimePkgs = self'.packages.hyprland.passthru.runtimePackages;
@@ -38,15 +34,9 @@
}; };
config = { config = {
programs.hyprland = programs.hyprland = {
{
enable = true; enable = true;
package = self'.packages.hyprland; package = self'.packages.hyprland;
}
// lib.optionalAttrs config.hyprland.enablePlugins {
plugins = with inputs'; [
hyprgrass.packages.default
];
}; };
services.displayManager.defaultSession = "hyprland"; services.displayManager.defaultSession = "hyprland";
@@ -65,9 +55,20 @@
runtimePkgs)} runtimePkgs)}
''; '';
system.activationScripts.hyprConfig = lib.stringAfter ["specialfs"] '' system.activationScripts.hyprConfig = let
pluginFile = builtins.toFile "plugins.lua" ''
hl.on("hyprland.start", function ()
${lib.optionalString config.hyprland.enablePlugins ''
hl.exec("hyprctl plugin load ${inputs'.hyprgrass.default}/lib/lib${inputs'.hyprgrass.default.pname}.so")
''}
end)
'';
in
lib.stringAfter ["specialfs"] ''
mkdir -p /run/hypr/config mkdir -p /run/hypr/config
rm -rf /run/hypr/config/*
ln -sfn ${inputs'.hyprland.packages.repo-files}/* /run/hypr/config ln -sfn ${inputs'.hyprland.packages.repo-files}/* /run/hypr/config
ln -sfn ${pluginFile} /run/hypr/config/plugins.lua
''; '';
}; };
}); });