I am currently trying to install hyprland-plugins. The maintainer for a long time just had instructions for installing it using Home-Manager and flakes but recently began provideing instructions for NixOS users just using configuration.nix
. According to the README in the GitHub repo linked to above, this is the required code block:
{ lib, pkgs, inputs, ... }:
with lib; let
hyprPluginPkgs = inputs.hyprland-plugins.packages.${pkgs.system};
hypr-plugin-dir = pkgs.symlinkJoin {
name = "hyrpland-plugins";
paths = with hyprPluginPkgs; [
hyprexpo
#...plugins
];
};
in
{
environment.sessionVariables = { HYPR_PLUGIN_DIR = hypr-plugin-dir; };
}
And then add this to hyprland.conf
:
# load all the plugins you installed
exec-once = hyprctl plugin load "$HYPR_PLUGIN_DIR/lib/libhyprexpo.so"
That should be everything. But when I rebuild switch, here is the traceback:
Traceback
$ sudo nixos-rebuild switch --upgrade-all
unpacking 1 channels...
error:
… while evaluating the attribute 'config'
at /nix/store/z2hvk7vkk5h9s4nlpzvs90z9j9kjkzc9-nixos/nixos/lib/modules.nix:360:9:
359| options = checked options;
360| config = checked (removeAttrs config [ "_module" ]);
| ^
361| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/store/z2hvk7vkk5h9s4nlpzvs90z9j9kjkzc9-nixos/nixos/lib/modules.nix:360:18:
359| options = checked options;
360| config = checked (removeAttrs config [ "_module" ]);
| ^
361| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attempt to call something which is not a function but a set: { environment = «thunk»; }
at /home/evangelist/nixoslaptop-configs/configuration.nix:17:1:
16| in
17| {
| ^
18| environment.sessionVariables = { HYPR_PLUGIN_DIR = hypr-plugin-dir; };
warning: could not build a newer version of nixos-rebuild, using current version
building the system configuration...
error:
… while evaluating the attribute 'config'
at /nix/store/z2hvk7vkk5h9s4nlpzvs90z9j9kjkzc9-nixos/nixos/lib/modules.nix:360:9:
359| options = checked options;
360| config = checked (removeAttrs config [ "_module" ]);
| ^
361| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/store/z2hvk7vkk5h9s4nlpzvs90z9j9kjkzc9-nixos/nixos/lib/modules.nix:360:18:
359| options = checked options;
360| config = checked (removeAttrs config [ "_module" ]);
| ^
361| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attempt to call something which is not a function but a set: { environment = «thunk»; }
at /home/evangelist/nixoslaptop-configs/configuration.nix:17:1:
16| in
17| {
| ^
18| environment.sessionVariables = { HYPR_PLUGIN_DIR = hypr-plugin-dir; };
Command '['nix-build', '<nixpkgs/nixos>', '--attr', 'config.system.build.toplevel', '--no-out-link']' returned non-zero exit status 1.
nixoslaptop-configs on î‚ hypr-plugin-experiment [$!]
$
What is the traceback trying to say in greater detail? And what would you ppl suggest I might try next?
Here is my configuration.nix
source code permalink branched off on my personal GitHub repo.