/nur-packages

A collection of xonsh-xontribs for NUR repository

Primary LanguageNixMIT LicenseMIT

nur-packages

A collection of xonsh-xontribs for NUR repository

Build and populate cache

Cachix Cache

Xonsh is now included in this NUR as well:

The following xontribs are available in this NUR repo:

Usage

{ config, lib, ...  }: let
  inherit (config.nur.repos) xonsh-xontribs;
in {
  config = lib.mkIf (cfg.enable) {
    programs.xonsh = with xonsh-xontribs; {
      enable = true;
      package = xonsh-wrapper.override {
        xonsh = xonsh;
        extraPackages = ps: [
          xontrib-direnv
          xontrib-zoxide
          # ...
        ];
      };
    };
  };
}

Probably the easiest way to use this is as an overlay for nixpkgs. In your flake, add both this repository and nixpkgs. Then apply this overlay when you import the nixpkgs overlay.

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/unstable";
    xonsh-xontrib.url = "github:drmikecrowe/nur-packages";
  };

  outputs = { self, nixpkgs, xonsh-xontrib, ... }@inputs: {
  let
    packageSet = system: (import nixpkgs { inherit system; overlays = [ xonsh-xontrib.overlays ]; };
  in {
    devShells.x86_64-linux = let
        pkgs = packageSet "x86_64-linux";
    in {
      buildInputs = with pkgs; [
        xonsh.override {
          extraPackages = (ps: [
            ps.xonsh-direnv
            ps.xontrib-vox
          ]);
        }
      ];
    };
  };
}

You should be able to use this similarly wherever you import nixpkgs by setting it as one over the overlays.

Cachix Public Keys

Contributing

This is still very much a work in progress, and will be enhanced over time. However, the shell for a given xontrib is created by the create-xontrib-overlay.xsh script. This will build a shell with a possible build setup for the xontrib that you can test. Submit a PR and we will expand this repo with as many xontribs as we can.