-
Notifications
You must be signed in to change notification settings - Fork 96
/
flake.nix
91 lines (86 loc) · 2.14 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
ags = {
url = "github:aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
ags,
}: let
systems = ["x86_64-linux" "aarch64-linux"];
forEachSystem = nixpkgs.lib.genAttrs systems;
in {
packages = forEachSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = ags.lib.bundle {
inherit pkgs;
src = ./.;
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
(python3.withPackages (ps:
with ps; [
gpustat
dbus-python
pygobject3
]))
matugen
hyprpicker
hyprsunset
hypridle
wireplumber
networkmanager
upower
gvfs
swww
pywal
])
++ (nixpkgs.lib.optionals (system == "x86_64-linux") [pkgs.gpu-screen-recorder]);
};
});
# Define .overlay to expose the package as pkgs.hyprpanel based on the system
overlay = final: prev: {
hyprpanel = prev.writeShellScriptBin "hyprpanel" ''
if [ "$#" -eq 0 ]; then
exec ${self.packages.${final.stdenv.system}.default}/bin/hyprpanel
else
exec ${ags.packages.${final.stdenv.system}.io}/bin/astal -i hyprpanel "$@"
fi
'';
};
homeManagerModules.hyprpanel = import ./nix/module.nix self;
};
}