Files
custum-hyprpanel/flake.nix
Jas Singh 4cdda38604 Implement framework for custom modules and out of the box custom modules as well. (#213)
* Create declarative module scaffolding

* Added ram module (WIP)

* Updates to options, styling and more.

* Added function for styling custom modules.

* Added utility functions and cleaned up code

* Type and fn name updates.

* Update module utils to handle absent values.

* Added icon color in style2 that was missing.

* Linted utils.ts

* Add CPU module and update RAM module to use /proc/meminfo.

* Added disk storage module.

* Consolidate code

* Added netstat module and removed elements from systray default ignore list.

* Added keyboard layout module.

* Fix hook types and move module to customModules directory

* Added updates modules.

* Spacing updates

* Added weather module.

* Added power menu and power module in bar. Increased update default interval to 6 ours.

* Updated styling of bar buttons, made power menu label toggleable, etc.

* Consolidate code and add dynamic tooltips based on data being used.

* Make default custom mogules matugen compatible

* Update base theme

* Fix custom module background coloring

* Remove testing opacity.

* Update themes to account for new modules

* Update nix stuff for libgtop (Need someone to test this)

* Update nix

* Update fractions to multiplications

* Move styling in style directory

* Implement a polling framework for variables that can dynamically adjust polling intervals.

* Netstat module updates when interface name is changed.

* Readme update
2024-09-02 21:10:59 -07:00

85 lines
2.5 KiB
Nix

{
description = "A Bar/Panel for Hyprland with extensive customizability.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
ags.url = "github:Aylur/ags";
};
outputs = inputs:
let
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
"aarch64-linux"
];
forEachSystem = inputs.nixpkgs.lib.genAttrs systems;
pkgsFor = forEachSystem (
system:
import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
}
);
devShellFor =
system:
inputs.nixpkgs.lib.genAttrs [ "default" ] (
_:
inputs.nixpkgs.legacyPackages.${system}.mkShell {
buildInputs = [
pkgsFor.${system}.esbuild
pkgsFor.${system}.fish
pkgsFor.${system}.typescript
pkgsFor.${system}.bun
pkgsFor.${system}.libnotify
pkgsFor.${system}.dart-sass
pkgsFor.${system}.fd
pkgsFor.${system}.btop
pkgsFor.${system}.bluez
pkgsFor.${system}.libgtop
pkgsFor.${system}.gobject-introspection
pkgsFor.${system}.glib
pkgsFor.${system}.bluez-tools
pkgsFor.${system}.grimblast
pkgsFor.${system}.gpu-screen-recorder
pkgsFor.${system}.brightnessctl
pkgsFor.${system}.gnome.gnome-bluetooth
pkgsFor.${system}.python3
pkgsFor.${system}.matugen
inputs.ags.packages.${system}.agsWithTypes
];
nativeBuildInputs = with pkgsFor.${system}; [
nixfmt-rfc-style
nil
];
shellHook = ''
export GDK_BACKEND=wayland
export GI_TYPELIB_PATH=${pkgsFor.${system}.libgtop}/lib/girepository-1.0:${pkgsFor.${system}.glib}/lib/girepository-1.0:$GI_TYPELIB_PATH
'';
}
);
in
{
devShells = forEachSystem devShellFor;
overlay = final: prev: {
hyprpanel =
if final ? callPackage
then (final.callPackage ./nix { inherit inputs; }).desktop.script
else inputs.self.packages.${prev.stdenv.system}.default;
};
packages = forEachSystem (
system:
let
pkgs = pkgsFor.${system};
in
{
default = (pkgs.callPackage ./nix { inherit inputs; }).desktop.script;
}
);
};
}