From a7ad88a5ecf3f8573803be602cfedbc2ce68813d Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 29 Mar 2021 12:03:58 +0200 Subject: [PATCH] Include unstable channel as overlay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows nix cli tools to access unstable from niv’s pinned rev (instead of having to rely on uncached and unpinned channel:nixos-unstable). Also packageOverrides might get deprecated/removed[1] eventually. [1]: https://github.com/NixOS/nixpkgs/issues/43266 --- modules/default.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/modules/default.nix b/modules/default.nix index 8ecd4a3..243e91e 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -119,18 +119,14 @@ in }; systemd.services.nix-daemon.serviceConfig.CPUSchedulingPolicy = "batch"; - nixpkgs.config = { - # Add unstable channel - packageOverrides = pkgs: { + nixpkgs.overlays = [ + (import ../pkgs) + (final: prev: { unstable = import (import ../nix/sources.nix).nixpkgs-unstable { config = config.nixpkgs.config; overlays = config.nixpkgs.overlays; }; - }; - }; - - nixpkgs.overlays = [ - (import ../pkgs) + }) ]; # Globally set Let’s Encrypt requirements