Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlay.enable doesn't seem to work #677

Closed
emsquid opened this issue Dec 30, 2024 · 10 comments
Closed

overlay.enable doesn't seem to work #677

emsquid opened this issue Dec 30, 2024 · 10 comments

Comments

@emsquid
Copy link
Contributor

emsquid commented Dec 30, 2024

@benvonh
I added overlay.enable to my config but I still receive an error and need to set it manually

@benvonh
Copy link
Contributor

benvonh commented Dec 31, 2024

can you be any more descriptive.

What error are you getting and what's your full config?

@qweered
Copy link

qweered commented Jan 1, 2025

same issue, added hyprpanel.url to flake and import

# *.nix
{ inputs, ... }:
{
  imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ];
  
  programs.hyprpanel = {

    # Enable the module.
    # Default: false
    enable = true;

    overlay.enable = true;

    # Automatically restart HyprPanel with systemd.
    # Useful when updating your config so that you
    # don't need to manually restart it.
    # Default: false
    systemd.enable = true;

    # Add '/nix/store/.../hyprpanel' to your
    # Hyprland config 'exec-once'.
    # Default: false
    hyprland.enable = true;

    # Fix the overwrite issue with HyprPanel.
    # See below for more information.
    # Default: false
    overwrite.enable = true;

    # Import a theme from './themes/*.json'.
    # Default: ""
    theme = "gruvbox_split";

    # Override the final config with an arbitrary set.
    # Useful for overriding colors in your selected theme.
    # Default: {}
    override = {
      theme.bar.menus.text = "#123ABC";
    };

    # Configure bar layouts for monitors.
    # See 'https://hyprpanel.com/configuration/panel.html'.
    # Default: null
    layout = {
      "bar.layouts" = {
        "0" = {
          left = [ "dashboard" "workspaces" ];
          middle = [ "media" ];
          right = [ "volume" "systray" "notifications" ];
        };
      };
    };

    # Configure and theme almost all options from the GUI.
    # Options that require '{}' or '[]' are not yet implemented,
    # except for the layout above.
    # See 'https://hyprpanel.com/configuration/settings.html'.
    # Default: <same as gui>
    settings = {
      bar.launcher.autoDetectIcon = true;
      bar.workspaces.show_icons = true;

      menus.clock = {
        time = {
          military = true;
          hideSeconds = true;
        };
        weather.unit = "metric";
      };

      menus.dashboard.directories.enabled = false;
      menus.dashboard.stats.enable_gpu = true;

      theme.bar.transparent = true;

      theme.font = {
        name = "CaskaydiaCove NF";
        size = "16px";
      };
    };
  };
}

to home manager configuration

@qweered
Copy link

qweered commented Jan 1, 2025

Works after adding {nixpkgs.overlays = [inputs.hyprpanel.overlay];} to nixosConfigurtion (i use home manager as a module)

@benvonh
Copy link
Contributor

benvonh commented Jan 1, 2025

@qweered Whether you use Home Manager's NixOS module doesn't actually matter unless if you have useGlobalPkgs set; then you would need to set it manually (I tested it both ways myself a bunch of times now).

Can you guys make sure you're actually using the updated HM module? Like, do a nix flake update in your config repo just to make sure.

(edit: and a rm flake.lock to be double sure)

@qweered
Copy link

qweered commented Jan 1, 2025

I have useGlobalPkgs enabled, flake is surely updated

@benvonh
Copy link
Contributor

benvonh commented Jan 2, 2025

Then yeah, you have to do it manually lol

@ralisv
Copy link

ralisv commented Jan 13, 2025

Hello, I am having similar problem. Here is my flake.nix and here is the hyprpanel.nix.

I am getting this error:

 λ home-manager switch --verbose
error:
       … while evaluating a branch condition
         at /nix/store/qpjsygnxp61armwi0rhk3yw7wygc27ch-source/lib/lists.nix:125:9:
          124|       fold' = n:
          125|         if n == len
             |         ^
          126|         then nul

       … while calling the 'length' builtin
         at /nix/store/qpjsygnxp61armwi0rhk3yw7wygc27ch-source/lib/lists.nix:123:13:
          122|     let
          123|       len = length list;
             |             ^
          124|       fold' = n:

       … while evaluating the option `programs.firefox.vendorPath':

       … while evaluating the module argument `pkgs' in "/nix/store/alm3nymx19kvkc8my31niws5d81b9pri-source/modules/programs/firefox.nix:anon-1":

       … while evaluating the option `nixpkgs.overlays':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: The option `nixpkgs.overlays` is defined both null and not null, in `/nix/store/j0mc7626ds1ji99d3kwr4ysk0w6nksps-source/home-manager/hyprland/hyprpanel.nix' and `<unknown-file>'.

I have triple checked and I define overlays in no other place but in flake.nix, I don't use global nixpkgs either.

When using the whole example hyprpanel configuration file from tutorial here, it works flawlessly. I'm not sure what precisely caused it.

@benvonh
Copy link
Contributor

benvonh commented Jan 13, 2025

This is seemingly a different issue that I am trying to address in my latest PR #707

@ralisv Your issue is more related to #686

Can you try my fork and see if it fixes it? Set hyprpanel.url = "github:benvonh/HyprPanel"; and run nix flake update

@ralisv
Copy link

ralisv commented Jan 13, 2025

@benvonh yes, you're right. Using the problematic commit and changing only the url you provided, it switches correctly.

Thanks for quick response.

@orangci
Copy link
Collaborator

orangci commented Jan 14, 2025

closed with #707

@orangci orangci closed this as completed Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants