diff options
| author | seth <[email protected]> | 2023-04-27 00:50:52 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-04-27 00:50:52 -0400 |
| commit | 242c23b9d49a8ea5787a4f260c83a9b61975f555 (patch) | |
| tree | 370416a17de364d525df366b453ef04a6d370809 | |
| parent | 0b7bfa0d76d143b28a0be7c2d12397d9d16552c1 (diff) | |
docs: use channels in readme instead of fetchTarball
| -rw-r--r-- | README.md | 32 |
1 files changed, 17 insertions, 15 deletions
@@ -5,7 +5,7 @@ ### enable cachix i have a binary cache at <https://getchoo.cachix.org>, make sure to enable it -in your flake or nixos/darwin config +in your flake or nixos/darwin config. ### library @@ -42,24 +42,25 @@ in your flake or nixos/darwin config } ``` -### home-manager +### nix channels -```nix -{ - home-manager.users.<name> = let - # you can use a flake input here instead as shown in the last example - getchoo = builtins.fetchTarball "https://github.com/getchoo/overlay/archive/refs/heads/main.tar.gz"; - in {nixpkgs.overlays = [getchoo.overlays.default];}; -} +#### adding the channel + +```bash +nix-channel --add https://github.com/getchoo/nix-exprs/archive/main.tar.gz getchoo +nix-channel --update ``` -### `configuration.nix` +#### usage ```nix -_: let - getchoo = builtins.fetchTarball "https://github.com/getchoo/overlay/archive/refs/heads/main.tar.gz"; +{pkgs, ...}: let + getchoo = import <getchoo>; in { - nixpkgs.overlays = [getchoo.overlays.default]; + nixpkgs.overlays = [getchoo.overlays.default]; + environment.systemPackages = with pkgs; [ + treefetch + ]; } ``` @@ -80,10 +81,11 @@ nix run getchoo#treefetch #### overlays.nix -in `~/.config/nixpkgs/overlays.nix` (or a nix file in `~/.config/nixpkgs/overlays/`): +[add the channel](#adding-the-channel) to your nix profile, then place +this in `~/.config/nixpkgs/overlays.nix` (or a nix file in `~/.config/nixpkgs/overlays/`): ```nix let - getchoo = import (builtins.fetchTarball "https://github.com/getchoo/overlay/archive/refs/heads/main.tar.gz"); + getchoo = import <getchoo>; in [getchoo.overlays.default] ``` |
