Jas-SinghFSU / HyprPanel

A Bar/Panel for Hyprland with extensive customizability.
MIT License
913 stars 64 forks source link

Problems with installtion on NixOS (not a duplicate) #320

Closed madfanat closed 1 month ago

madfanat commented 1 month ago

Describe the bug I added hyprpanel.url = “github:Jas-SinghFSU/HyprPanel”; and nixpkgs.overlays = [ inputs.hyprpanel.overlay ]; to my flake.nix and pkgs.hyprpanel to my home.nix package list. The configuration builds without error, but I can't run ags because for some reason it's not installed. If it is possible, I would like to install the package in the usual flakes way (via something like imports = [ inputs.hyprpanel.homeManagerModules.default ];) instead of using overlays, but I have tried all the common attributes and didn't get it working. Please help me to find the correct attributes/path to use.

$ ags
The program 'ags' is not in your PATH. You can make it available in an
ephemeral shell by typing:
  nix-shell -p ags
flake.nix ```nix { description = "NixOS configuration"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; ironbar.url = "github:JakeStanger/ironbar"; hyprpanel.url = "github:Jas-SinghFSU/HyprPanel"; catppuccin.url = "github:catppuccin/nix"; }; outputs = inputs@{ nixpkgs, home-manager, ... }: { nixosConfigurations = { nixos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.tim = import ./home.nix; home-manager.backupFileExtension = "old"; home-manager.extraSpecialArgs = { inherit inputs; }; nixpkgs.overlays = [ inputs.hyprpanel.overlay ]; } ]; }; }; }; } ```

To Reproduce

  1. Add hyprpanel.url = "github:Jas-SinghFSU/HyprPanel"; to inputs = { ... } in flake.nix
  2. Add nixpkgs.overlays = [ inputs.hyprpanel.overlay ]; to the modules configuration in flake.nix
  3. Add pkgs.hyprpanelto home.packages = [ ... ] in home.nix

Expected behavior Bar runs with the ags command.

Desktop

madfanat commented 1 month ago

If I remove the overlay and add inputs.hyprpanel.packages.${pkgs.system}.default to my home.nix package list, I get

this error. ```fish error: … while calling the 'head' builtin at /nix/store/60sn02zhawl3kwn0r515zff3h6hg6ydz-source/lib/attrsets.nix:1575:11: 1574| || pred here (elemAt values 1) (head values) then 1575| head values | ^ 1576| else … while evaluating the attribute 'value' at /nix/store/60sn02zhawl3kwn0r515zff3h6hg6ydz-source/lib/modules.nix:816:9: 815| in warnDeprecation opt // 816| { value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 817| inherit (res.defsFinal') highestPrio; (stack trace truncated; use '--show-trace' to show the full trace) error: The option `home-manager.users.tim.programs.hyprpanel' does not exist. Definition values: - In `/nix/store/60sn02zhawl3kwn0r515zff3h6hg6ydz-source/flake.nix': { enable = true; } ```
P.S. home.nix ```nix { inputs, config, pkgs, ... }: { imports = [ ./home/xdg.nix ./home/fish.nix ./home/eza.nix ./home/bottom.nix ./home/bat.nix ./home/alacritty.nix ./home/helix.nix ./home/git.nix ./home/zoxide.nix ./home/hyprland/hyprland.nix ./home/hyprland/hypridle.nix ./home/swaync.nix ./home/udiskie.nix ./home/ironbar.nix ./home/bemenu.nix ./home/obs.nix ./home/catppuccin.nix ]; home = { username = "tim"; homeDirectory = "/home/tim"; }; home.packages = [ pkgs.ripgrep-all pkgs.wl-clipboard pkgs.hyprshot pkgs.swaybg pkgs.nautilus pkgs.eog pkgs.google-chrome pkgs.clapper pkgs.deadbeef pkgs.transmission_4-gtk pkgs.telegram-desktop pkgs.yt-dlp pkgs.prismlauncher pkgs.lutris pkgs.setzer # proton-ge-bin inputs.hyprpanel.packages.${pkgs.system}.default ]; programs.hyprpanel = { enable = true; }; home.pointerCursor = { gtk.enable = true; package = pkgs.bibata-cursors; name = "Bibata-Modern-Classic"; size = 24; }; home.stateVersion = "24.05"; programs.home-manager.enable = true; } ```

UPD. If I remove

 programs.hyprpanel = {
    enable = true;
 };

from my home.nix it builds with no errors. But the programs still can't be run via ags for some reason.