Monorepo for sharing my most commonly used Nix expressions between hostsç
Find a file
NotAShelf e3b52425c8
Some checks failed
Build / Find uncached packages (push) Has been cancelled
Run Checks / check (NIXPKGS_ALLOW_INSECURE=1 nix flake check --accept-flake-config --impure) (push) Has been cancelled
Run Checks / check (nix run .#alejandra-custom -- -c . -e ./npins) (push) Has been cancelled
Nix / nix (push) Has been cancelled
Build / build-uncached (push) Has been cancelled
Run Checks / build (push) Has been cancelled
[CI]: update npins
2025-09-30 01:47:28 +00:00
.github build(deps): bump actions/checkout from 4 to 5 2025-08-18 02:08:56 +00:00
npins [CI]: update npins 2025-09-30 01:47:28 +00:00
pkgs headscale-ui: 2025.05.22 -> 2025.08.23 2025-09-13 20:45:11 +03:00
.editorconfig meta: add editorconfig 2024-07-21 23:51:28 +03:00
.envrc flake: direnv 2023-11-07 16:02:21 +03:00
.gitattributes meta: don't diff churn 2025-06-11 12:03:13 +03:00
.gitignore initial commit 2023-11-03 10:25:58 +03:00
default.nix nix: simplify flake-compat exp 2025-06-11 12:04:24 +03:00
flake.lock [CI]: update flake inputs 2025-09-28 01:02:00 +00:00
flake.nix flake: fix infrec 2025-07-24 21:17:13 +03:00
LICENSE add license 2023-11-03 10:54:40 +03:00
README.md docs: improve usage examples; add diniamo to credits 2025-06-11 12:03:56 +03:00
shell.nix flake: make nix-shell consistent with nix develop 2024-07-21 23:51:45 +03:00

🌙 nyxexprs

Welcome to nyxexprs! This is my personal package overlay, for derivations I use from time to time when they do not fit my "monorepo" use case. This repository holds things I've packages, as well as derivations and a binary cache for most of my personal projects. 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 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/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
  environment.systemPackages = [
    # `pkgs.stdenv.hostPlatform.system` is an explicit way of replacing
    # `pkgs.system`. It is especially important on systems with aliases
    # disabled in their nixpkgs config. Nixpkgs also likes enjoying changing
    # things around every once in a while, so being explicit is good.
    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 codee, patches, etc.) is released under EUPL v1.2. Please see the license file for more details.