aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/compile.nix
blob: 18ff6f59188932e29e30950ae81527ac5d33e03d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
  config,
  lib,
  pkgs,
  ...
}:
with lib; {
  options = {
    cynerd.compile = mkOption {
      type = types.bool;
      default = false;
      description = "If machine is about to be used for compilation.";
    };
  };

  config = mkIf config.cynerd.compile {
    nix.settings = {
      max-jobs = 32;
      cores = 0;
    };

    boot.binfmt.emulatedSystems = ["armv7l-linux" "aarch64-linux" "riscv32-linux"];

    environment.systemPackages = with pkgs; [
      # Tools
      git
      bash
      #uroot
      qemu

      # Python
      python3Packages.pip
    ];
  };
}