]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/builder.nix
nix: disable global registry
[julm/julm-nix.git] / nixos / profiles / builder.nix
1 {
2 pkgs,
3 lib,
4 inputs,
5 ...
6 }:
7 {
8 nix.settings.experimental-features = [
9 "nix-command"
10 "flakes"
11 ];
12 # ExplanationNote: disable global registry
13 # to keep only system registry.
14 nix.settings.flake-registry = "/etc/nix/registry.json";
15 #nix.registry.self.flake = inputs.self;
16 nixpkgs.flake = {
17 # ExplanationNote: use input.nixpkgs to record a public rev
18 # into flake.nix using flake:nixpkgs as an input.
19 source = inputs.nixpkgs;
20 #source = pkgs.path;
21 setNixPath = true;
22 setFlakeRegistry = true;
23 };
24 nix.registry.nixpkgs = {
25 from = {
26 id = "nixpkgs";
27 type = "indirect";
28 };
29 to = {
30 owner = "NixOS";
31 repo = "nixpkgs";
32 inherit (inputs.nixpkgs) rev;
33 # May be overriden by nixos/modules/installer/cd-dvd/channel.nix
34 type = lib.mkDefault "github";
35 };
36 };
37 }