summaryrefslogtreecommitdiff
path: root/modules/basic-tools/nix.nix
blob: 12d5ee37e6d76c11d013e61e239cbf9f65ee3e4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{ lib, pkgs, inputs, ... }: {

  nix = {
    extraOptions = ''
      experimental-features = nix-command flakes
    '';
  };

  # override default nix shell nixpkgs# behaviour to use current flake lock
  nix.registry =
    let flakes = lib.filterAttrs (_name: value: value ? outputs) inputs.self.inputs;
    in builtins.mapAttrs (_name: v: { flake = v; }) flakes;

  nix.nixPath = lib.mapAttrsToList (name: value: "${name}=${value.outPath}") inputs.self.inputs;
}