summaryrefslogtreecommitdiff
path: root/modules/core/nix/extended-support.nix
blob: ac85e6ad40ceb4e91e81cb358c52cbd7f96d8566 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  config,
  lib,
  pkgs,
  ...
}:
{
  config = lib.mkIf config.modules.nix.extendedSupport {
    programs.nix-index-database.comma.enable = true;
    boot.binfmt.emulatedSystems = [ "aarch64-linux" ];

    nix.settings = {
      extra-platforms = config.boot.binfmt.emulatedSystems;

      extra-sandbox-paths = [
        config.programs.ccache.cacheDir
        "/run/binfmt"
        "${pkgs.qemu}"
      ];
    };
  };
}