justinhschaaf / nix-packages

Personal collection of Nix packages. Right now there are only fonts.
MIT License
0 stars 0 forks source link

nix-packages

My personal collection of Nix packages. Right now there are only fonts.

How did you set this up?

How do I use it with NixOS?

Based on the instructions from the Kampka repo, try adding the following in the main body of your configuration.nix:

nixpkgs.config.packageOverrides = pkgs: {
    justinhs = pkgs.callPackage (import (builtins.fetchGit {
        url = "https://github.com/justinhschaaf/nix-packages";
    })) {};
};

For a flake, add the following input:

justinhs-packages.url = "github:justinhschaaf/nix-packages/main";

Then, add the following to your outputs:

outputs = { self, nixpkgs, ... }@inputs:
let
    jspkgs = import justinhs-packages { inherit system; };
in
{
    nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
        specialArgs = { inherit jspkgs; };
    };
};

See my config for a fully functional flake example.

How do I test building a package?

Run nix-build -A <package>, replacing <package> with the package you want to build. This question mostly exists for me as I'd forget without it.

Why didn't you just contribute it to nixpkgs?

  1. Introversion
  2. Fear of my bad work being judged and depended on by real people
  3. I'd have more of an obligation to maintain it