Created
April 25, 2024 16:36
-
-
Save Lillecarl/5ce2ce445dc67889f3eca9b225b99a6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, lib, inputs, self, ... }: | |
let | |
pin = | |
let | |
src = inputs.hyprscroller; | |
pinpath = "${src}/hyprpm.toml"; | |
toml = builtins.fromTOML (builtins.readFile pinpath); | |
pins = toml.hyprscroller.commit_pins; | |
pin = lib.lists.last pins; | |
landrev = lib.elemAt pin 0; | |
scrollrev = lib.elemAt pin 1; | |
in | |
{ | |
inherit landrev scrollrev; | |
}; | |
hyprscroller = pkgs.callPackage "${self}/pkgs/hyprscroller.nix" { | |
inherit hyprland; | |
#hyprland = pkgs.hyprland; | |
src = pkgs.fetchFromGitHub { | |
owner = "dawsers"; | |
repo = "hyprscroller"; | |
rev = pin.scrollrev; | |
sha256 = "sha256-hg1kQ1fzLRbxPI5hJdtZOsT61mzKNtgVqGqSW8wYycc="; | |
}; | |
}; | |
hyprland = | |
let | |
src = pkgs.fetchFromGitHub { | |
owner = "hyprwm"; | |
repo = "hyprland"; | |
rev = pin.landrev; | |
sha256 = "sha256-Urb/njWiHYUudXpmK8EKl9Z58esTIG0PxXw5LuM2r5g="; | |
}; | |
flake = inputs.get-flake src; | |
pkg = flake.packages.${pkgs.system}.hyprland; | |
#pkg = pkgs.hyprland.overrideAttrs (oldAttrs: { | |
# src = src; | |
#}); | |
in | |
pkg; | |
in | |
{ | |
options.programs.hyprland.plugins = lib.mkOption { | |
type = lib.types.listOf lib.types.package; | |
default = [ ]; | |
description = "Hyprland plugins to install."; | |
}; | |
config = { | |
programs.hyprland = { | |
enable = true; | |
package = hyprland; | |
plugins = [ hyprscroller ]; | |
}; | |
programs.nm-applet.enable = true; | |
}; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment