Skip to content

charmbracelet/nur

Repository files navigation

Nix User Repository

This repository contains Charm’s Nix User Repository.

Build and populate cache

Usage

With flake

NixOS

Add the flake as an input in your flake.nix file and include the desired module in your configuration:

inputs = {
  nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  nur = {
    url = "github:charmbracelet/nur";
    inputs.nixpkgs.follows = "nixpkgs";
  };
};

outputs = { self, nixpkgs, nur, ... }:
{
  nixosConfigurations.example = nixpkgs.lib.nixosSystem {
    inherit system;
    modules = [
      nur.nixosModules.crush
      { programs.crush.enable = true; }
    ];
  };
}

Home Manager

Add the flake as an input and include the desired module in your Home Manager configuration:

inputs = {
  nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  home-manager = {
    url = "github:nix-community/home-manager";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  nur = {
    url = "github:charmbracelet/nur";
    inputs.nixpkgs.follows = "nixpkgs";
  };
};

outputs = { self, nixpkgs, nur, home-manager, ... }:
{
  homeConfigurations.user = home-manager.lib.homeManagerConfiguration {
    inherit pkgs;
    modules = [
      nur.homeModules.crush
      { programs.crush.enable = true; }
    ];
  };
}

Available Modules

  • NixOS Modules:

    • nixosModules.crush: Provides NixOS integration for the crush tool.
  • Home Manager Modules:

    • homeModules.crush: Provides Home Manager integration for the crush tool.

Configuration Options

programs.crush

  • enable (boolean): Enable the crush tool (default: false).
  • package (package): Override the package used for crush. Defaults to the package provided by this repository.
  • settings (attribute set): Additional configuration settings for crush.

Example: Override Package

programs.crush = {
  enable = true;
  package = pkgs.callPackage /path/to/custom/crush {};
};

Part of Charm.

The Charm logo

Charm热爱开源 • Charm loves open source

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published