{ pkgs, lib, inputs, ... }: { nix.settings.experimental-features = [ "nix-command" "flakes" ]; # ExplanationNote: disable global registry # to keep only system registry. nix.settings.flake-registry = "/etc/nix/registry.json"; #nix.registry.self.flake = inputs.self; nixpkgs.flake = { # ExplanationNote: use input.nixpkgs to record a public rev # into flake.nix using flake:nixpkgs as an input. source = inputs.nixpkgs; #source = pkgs.path; setNixPath = true; setFlakeRegistry = true; }; nix.registry.nixpkgs = { from = { id = "nixpkgs"; type = "indirect"; }; to = { owner = "NixOS"; repo = "nixpkgs"; inherit (inputs.nixpkgs) rev; # May be overriden by nixos/modules/installer/cd-dvd/channel.nix type = lib.mkDefault "github"; }; }; }