Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend using nix-channel instead of an unpined version of master in README.md #252

Open
kira-bruneau opened this issue Jul 18, 2020 · 5 comments

Comments

@kira-bruneau
Copy link
Contributor

I found that using NUR as nix channel is a much better alternative to fetching an unpinned version master. It provides greater controller over when the repo is updated and it's very easy to rollback if an update causes a problem.

I was thinking REAME.md could be updated along the lines of:


To make NUR accessible for your login user, first add a new user-specific channel:

nix-channel --add https://github.com/nix-community/NUR/archive/master.tar.gz nur
nix-channel --update

Or alternatively install a system-wide channel running nix-channel as root:

sudo nix-channel --add https://github.com/nix-community/NUR/archive/master.tar.gz nur
sudo nix-channel --update

and then include the channel in your packageOverrides in ~/.config/nixpkgs/config.nix:

{
  packageOverrides = pkgs: {
    nur = import <nur> {
      inherit pkgs;
    };
  };
}

For NixOS add a new system-wide channel (if it wasn't already added above):

sudo nix-channel --add https://github.com/nix-community/NUR/archive/master.tar.gz nur
sudo nix-channel --update

and then include the channel in your packageOverrides in /etc/nixos/configuration.nix

{
  nixpkgs.config.packageOverrides = pkgs: {
    nur = import <nur> {
      inherit pkgs;
    };
  };
}

What do you think?

@kira-bruneau kira-bruneau changed the title Recommend nix-channel instead of an unpined version of master in README.md Recommend using nix-channel instead of an unpined version of master in README.md Jul 18, 2020
@Mic92
Copy link
Member

Mic92 commented Jul 18, 2020

Sure we can have both. Maybe even something like https://github.com/nmattia/niv. Pinning is also possible with the fetchTarball variant. I think there can be multiple ways listed including their trade-offs with a recommend version.

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Jul 18, 2020

I originally used pinning, but I found it cumbersome to add a new commit to two separate repos for both NixOS and home-manager.

@Mic92
Copy link
Member

Mic92 commented Jul 18, 2020

This is where niv comes in handy. Niv is good for teams because you have little control over your colleagues nix channel.

@kira-bruneau
Copy link
Contributor Author

It looks like there is a related discussion in #150

@Mic92
Copy link
Member

Mic92 commented Jul 28, 2020

Do you plan to open a pull request for the readme?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants