/nix-packages

My personal nix repository

Primary LanguageJavaScriptMIT LicenseMIT

My personal nix-repository

Build Status

This repository contains nix expressions, including derivations of packages that I maintain, mostly for myself.

Usage

Nix User Repository

This repository is available via the Nix User Repository

Packages can be installed from the NUR via the kampka namespace, eg:

$ nix-env -iA nur.repos.kampka.nixify

This is the preferred way of installing packages from this repository.

Without the NUR

To make the repository accessible for your login user, add the following to ~/.config/nixpkgs/config.nix:

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

For NixOS add the following to your /etc/nixos/configuration.nix:

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

Then packages can be used or installed from the kampka namespace.

$ nix-shell -p kampka.nixify

or

$ nix-env -iA nixos.kampka.nixify

or

{
    # /etc/nixos/configuration.nix
    environment.systemPackages = [
      pkgs.kampka.nixify
    ];
}

Modules

Modules defined in this repository are defined in the kampka namespace. This helps to avoid namespace conflicts with the nixpkgs and other NUR repositories.

To enable these modules, you simply define the path accordingly:

{ pkgs, config, lib, ... }:
let
  nur-no-pkgs = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {};
in {

  imports = [
    nur-no-pkgs.repos.kampka.modules.zsh-history
  ];

  kampka.programs.zsh-history.enable = true;

}