Chore: Add devShell to flake.nix (also update flake.lock) (#964)

* Add devShell

* Update flake.lock

---------

Co-authored-by: orangc <orangc@proton.me>
Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
This commit is contained in:
DADA30000
2025-06-02 09:53:39 +03:00
committed by GitHub
parent 83affe1605
commit 3616e5806b
2 changed files with 123 additions and 60 deletions

144
flake.nix
View File

@@ -1,7 +1,11 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
astal = {
url = "github:aylur/astal";
inputs.nixpkgs.follows = "nixpkgs";
};
ags = {
url = "github:aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
@@ -12,6 +16,7 @@
{
self,
nixpkgs,
astal,
ags,
}:
let
@@ -20,8 +25,93 @@
"aarch64-linux"
];
forEachSystem = nixpkgs.lib.genAttrs systems;
packages =
system: pkgs:
(with ags.packages.${system}; [
tray
hyprland
apps
battery
bluetooth
mpris
cava
network
notifd
powerprofiles
wireplumber
])
++ (with pkgs; [
fish
typescript
libnotify
dart-sass
fd
btop
bluez
libgtop
gobject-introspection
glib
bluez-tools
grimblast
brightnessctl
gnome-bluetooth
gtksourceview3
libsoup_3
(python3.withPackages (
ps: with ps; [
gpustat
dbus-python
pygobject3
]
))
matugen
hyprpicker
hyprsunset
hypridle
wireplumber
networkmanager
wf-recorder
upower
gvfs
swww
pywal
]);
in
{
devShells = forEachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
buildInputs =
with pkgs;
packages system pkgs
++ [
ags.packages.${system}.ags
astal.packages.${system}.astal3
astal.packages.${system}.io
gjs
meson
pkg-config
ninja
];
shellHook = ''
if [ "''${PWD##*/}" = "HyprPanel" ]; then
echo "do you want to initialise stuff in order for tsserver to work? (y/anything_else)"
read consent
if [ "$consent" = "y" ]; then
ags types -d .; mkdir node_modules; ln -s ${astal.packages.${system}.gjs}/share/astal/gjs ./node_modules/astal
fi
else
echo "you're not in HyprPanel root dir, no initialisation for you"
fi
'';
};
}
);
packages = forEachSystem (
system:
let
@@ -34,56 +124,8 @@
name = "hyprpanel"; # name of executable
entry = "app.ts";
extraPackages =
(with ags.packages.${system}; [
tray
hyprland
apps
battery
bluetooth
mpris
cava
network
notifd
powerprofiles
wireplumber
])
++ (with pkgs; [
fish
typescript
libnotify
dart-sass
fd
btop
bluez
libgtop
gobject-introspection
glib
bluez-tools
grimblast
brightnessctl
gnome-bluetooth
gtksourceview3
libsoup_3
(python3.withPackages (
ps: with ps; [
gpustat
dbus-python
pygobject3
]
))
matugen
hyprpicker
hyprsunset
hypridle
wireplumber
networkmanager
wf-recorder
upower
gvfs
swww
pywal
]);
extraPackages = packages system pkgs;
};
# Make a wrapper package to avoid overlay
wrapper = pkgs.writeShellScriptBin "hyprpanel" ''