nyxexprs/README.md
NotAShelf f83f0b5632
Some checks are pending
Build / Find uncached packages (push) Waiting to run
Build / build-uncached (push) Blocked by required conditions
Run Checks / check (NIXPKGS_ALLOW_INSECURE=1 nix flake check --accept-flake-config --impure) (push) Waiting to run
Run Checks / check (nix run .#alejandra-custom -- -c . -e ./npins) (push) Waiting to run
Run Checks / build (push) Blocked by required conditions
Nix / nix (push) Waiting to run
docs: minor improvements to project README
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic6f07cfcb59f1d2b08bfd4703a0c4fd26a6a6964
2025-12-02 19:41:25 +03:00

3.7 KiB

🌙 nyxexprs

Welcome to Nyxexprs! This is my personal package collection and overlay, for derivations I use from time to time when they do not fit my "monorepo" use case in Nyx. This repository holds things I've packaged, which is primarily packages not available in Nixpkgs or Git versions of packages with the added convenience of a binary cache. It also contains packages and modules I've refactored out of my personal NixOS configuration, Nyx (hence the name "nyxexprs.")

Kept up to date with Github workflows and npins. Contributions, in the form of Pull Requests or patches welcome.

Usage

All packages in Nyxexprs are exposed in the flake outputs, under packages. An overlay is also provided through flake-parts' easy-overlay module

Flakes

# In your flake.nix

{
  inputs = {
    # Your Nixpkgs input
    nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";

    # Add an input as such. Do NOT add the "follows" line (a typical flakes
    # pattern) if you intend to use the binary cache.
    nyxexprs.url = "github:notashelf/nyxexprs";
    
    # Other inputs
    # ...
  };
}

Then get the package you need directly from inputs

{ 
  inputs,
  ...
}: {
  # For this to be valid, you need `inputs` in the argset above and nyxexprs
  # to be in your `inputs`, as demonstrated in the flake.nix example. You 
  # will also need `inputs` to be in your `nixosSystem` call's `specialArgs`
  # or else you will not be able to access `inputs` in your modules.
  environment.systemPackages = [
    inputs.nyxexprs.packages.${pkgs.stdenv.hostPlatform.system}.tempus # example
  ];
}

Overlay

An overlay is provided. Once added, it may be consumed as follows:

{
  inputs, # needs to be in scope, e.g., with `specialArgs`
  pkgs,
  ...
}: {
  nixpkgs.overlays = [inputs.nyxexprs.overlays.default];

  # Overlays modify the `pkgs` instance. If consumed, all
  # of my packages will be appended directly to your pkgs
  # at which point you can consume them as `pkgs.package`
  environment.systemPackages = [
    pkgs.tempus # example package
  ];
}

Tip

If you are using Nix on a non-NixOS distro, you may nix run to try out packages, or nix profile install to install them on your system profile. If using home-manager on non-NixOS, I recommend using home.packages instead.

Binary Cache

Regardless of your setup, you may want to add the binary cache to your substituters to avoid building the provided packages on each pull. You may follow the example below to add the binary cache to your system.

{ 
  nix.settings = {
    builders-use-substitutes = true;
    substituters = [
        # Add the Nyx cache
        "https://nyx.cachix.org"
    ];

    trusted-public-keys = [
        # And the trusted public key for Nyx
        "nyx.cachix.org-1:xH6G0MO9PrpeGe7mHBtj1WbNzmnXr7jId2mCiq6hipE="

        # Other trusted public keys
        # ...
    ];
  };
}

🫂 Credits

The repository structure is mostly borrowed from @fufexan 's nix-gaming repository. Thank you fuf!

I've also borrowed some CI logic around detecting uncached packages from @diniamo, which uses GitHub workflows in niqspkgs to build and cache packages missing in Cachix.

📜 License

This repository (Nix derivations, patches, etc.) is released under EUPL v1.2. Please see the license file for more details.