chore: Make wrapper as the default option (#1013)
* Make wrapper as the default option, clean up code a little * Update docs
This commit is contained in:
@@ -194,7 +194,7 @@ Once you've set up the overlay, you can reference HyprPanel with `pkgs.hyprpanel
|
|||||||
# install it as a system package
|
# install it as a system package
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# ...
|
# ...
|
||||||
inputs.hyprpanel.packages.${pkgs.system}.wrapper # this one if you want to avoid overlays/didn't enable them
|
inputs.hyprpanel.packages.${pkgs.system}.default # this one if you want to avoid overlays/didn't enable them
|
||||||
hyprpanel
|
hyprpanel
|
||||||
# ...
|
# ...
|
||||||
];
|
];
|
||||||
@@ -202,7 +202,7 @@ environment.systemPackages = with pkgs; [
|
|||||||
# or install it as a user package
|
# or install it as a user package
|
||||||
users.users.<username>.packages = with pkgs; [
|
users.users.<username>.packages = with pkgs; [
|
||||||
# ...
|
# ...
|
||||||
inputs.hyprpanel.packages.${pkgs.system}.wrapper # this one if you want to avoid overlays/didn't enable them
|
inputs.hyprpanel.packages.${pkgs.system}.default # this one if you want to avoid overlays/didn't enable them
|
||||||
hyprpanel
|
hyprpanel
|
||||||
# ...
|
# ...
|
||||||
];
|
];
|
||||||
@@ -213,7 +213,7 @@ users.users.<username>.packages = with pkgs; [
|
|||||||
# install it as a user package with home-manager
|
# install it as a user package with home-manager
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# ...
|
# ...
|
||||||
inputs.hyprpanel.packages.${pkgs.system}.wrapper # this one if you want to avoid overlays/didn't enable them
|
inputs.hyprpanel.packages.${pkgs.system}.default # this one if you want to avoid overlays/didn't enable them
|
||||||
hyprpanel
|
hyprpanel
|
||||||
# ...
|
# ...
|
||||||
];
|
];
|
||||||
|
|||||||
16
flake.nix
16
flake.nix
@@ -119,7 +119,7 @@
|
|||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
default = ags.lib.bundle {
|
unwrapped = ags.lib.bundle {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
src = ./.;
|
src = ./.;
|
||||||
name = "hyprpanel"; # name of executable
|
name = "hyprpanel"; # name of executable
|
||||||
@@ -127,12 +127,15 @@
|
|||||||
|
|
||||||
extraPackages = packages system pkgs;
|
extraPackages = packages system pkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
default = self.packages.${pkgs.stdenv.system}.wrapper;
|
||||||
|
|
||||||
# Make a wrapper package to avoid overlay
|
# Make a wrapper package to avoid overlay
|
||||||
wrapper = pkgs.writeShellScriptBin "hyprpanel" ''
|
wrapper = pkgs.writeShellScriptBin "hyprpanel" ''
|
||||||
# Exporting glib-networking modules
|
# Exporting glib-networking modules
|
||||||
export GIO_EXTRA_MODULES="${pkgs.glib-networking}/lib/gio/modules"
|
export GIO_EXTRA_MODULES="${pkgs.glib-networking}/lib/gio/modules"
|
||||||
if [ "$#" -eq 0 ]; then
|
if [ "$#" -eq 0 ]; then
|
||||||
exec ${self.packages.${pkgs.stdenv.system}.default}/bin/hyprpanel
|
exec ${self.packages.${pkgs.stdenv.system}.unwrapped}/bin/hyprpanel
|
||||||
else
|
else
|
||||||
exec ${ags.packages.${pkgs.stdenv.system}.io}/bin/astal -i hyprpanel "$@"
|
exec ${ags.packages.${pkgs.stdenv.system}.io}/bin/astal -i hyprpanel "$@"
|
||||||
fi
|
fi
|
||||||
@@ -147,14 +150,7 @@
|
|||||||
pkgs = final;
|
pkgs = final;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
hyprpanel = pkgs.writeShellScriptBin "hyprpanel" ''
|
hyprpanel = self.packages.${pkgs.stdenv.system}.wrapper;
|
||||||
export GIO_EXTRA_MODULES="${pkgs.glib-networking}/lib/gio/modules"
|
|
||||||
if [ "$#" -eq 0 ]; then
|
|
||||||
exec ${self.packages.${final.system}.default}/bin/hyprpanel
|
|
||||||
else
|
|
||||||
exec ${ags.packages.${final.system}.io}/bin/astal -i hyprpanel "$@"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
homeManagerModules.hyprpanel = import ./nix/module.nix self;
|
homeManagerModules.hyprpanel = import ./nix/module.nix self;
|
||||||
|
|||||||
Reference in New Issue
Block a user