From 0b7be3144c181511b57fe346dd1d924f540d10e1 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Thu, 20 Jun 2024 19:55:34 +0200 Subject: [PATCH] nixos/core: disable channels and set proper nix-paths --- nix-os/core.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/nix-os/core.nix b/nix-os/core.nix index 75cf2dd..cfb55e4 100644 --- a/nix-os/core.nix +++ b/nix-os/core.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running 'nixos-help'). -{ config, pkgs, lib, ... }: +{ inputs, lib, pkgs, ... }: let /* @@ -47,7 +47,16 @@ in # Allow unfree packages nixpkgs.config.allowUnfree = true; - nix.package = wrappedNix; + nix = { + package = wrappedNix; + channel.enable = false; + settings.nix-path = [ + "nixpkgs=${pkgs.selfExpr { useConfig = false; }}" + "systemNixpkgs=${pkgs.selfExpr { useConfig = true; name = "systemNixpkgs-self"; }}" + # don't garbage collect the nixpkgs input + "inputsNixpkgs=${inputs.nixpkgs}" + ]; + }; # List packages installed in system profile. To search, run: # $ nix search wget