Redid hyprscrolling.nix

This commit is contained in:
2026-02-25 19:48:57 +01:00
parent 706fdf6470
commit a72f387de0
2 changed files with 40 additions and 34 deletions
+20 -17
View File
@@ -1,24 +1,27 @@
# home/desktop/hyprscrolling.nix (Home-Manager module)
# home/desktop/hyprscrolling.nix (Home-Manager module)
{ config, lib, pkgs, flakeRoot, ... }:
let
cfg = config.programs.hyprscrolling;
repoConf = flakeRoot + "/assets/conf/desktop/hypr/hyprscrolling.conf";
repoConf =
flakeRoot + "/assets/conf/desktop/hypr/hyprscrolling.conf";
targetRel = "hypr/conf.d/90-hyprscrolling.conf";
in
{
options.programs.hyprscrolling.enable =
lib.mkEnableOption "hyprscrolling Hyprland plugin";
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland = {
# the key part: load plugin like you did for hyprshell
plugins = [ pkgs.hyprlandPlugins.hyprscrolling ];
# source the generated drop-in
extraConfig = lib.mkAfter ''
source = ~/.config/${targetRel}
'';
};
# place your repo config into ~/.config/hypr/conf.d/...
xdg.configFile."${targetRel}".source = repoConf;
# Make sure Hyprland is managed by Home-Manager
wayland.windowManager.hyprland = {
enable = true;
# Load the plugin
plugins = [
pkgs.hyprlandPlugins.hyprscrolling
];
# Source the drop-in config
extraConfig = ''
source = ~/.config/${targetRel}
'';
};
# Copy your repo config into ~/.config
xdg.configFile."${targetRel}".source = repoConf;
}