Skip to content

How to install packages from unstable channel via overlays? #171

@Kazuto

Description

@Kazuto

I'm trying to install a single package from the unstable channel but don't have the slightest clue about how because the docs aren't really helpful at all. They only show how to create overlays etc. but not how to use them.

This overlay will be made available on your flake’s overlays output with the same name as the directory that you created. is not really an explanation for users who never worked with overlays before. The docs need more examples and not just on how to create the file.

# overlays/sketchybar-app-font/default.nix

{
channels,
namespace,
inputs,
... }:

final: prev: {
    inherit (channels.unstable) sketchybar-app-font;
}

Where do I have to register the overlay?
How do I install the unstable package now in my modules/sketchybar/default.nix?

{ options, config, lib, pkgs, ... }:

with lib;
with lib.shiro;
let
  cfg = config.shiro.tools.sketchybar;
in
{
  options.shiro.tools.sketchybar = with types; {
    enable = mkBoolOpt false "Whether or not to install sketchybar";
  };

  config = mkIf cfg.enable {
    environment.systemPackages = with pkgs; [ sketchybar ];

    fonts.packages = with pkgs; [
        sketchybar-app-font
    ];

    services.sketchybar = {
      enable = true;
      package = pkgs.sketchybar;
    };
  };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions