distribute aarch64 openocd

This commit is contained in:
Sebastien Bourdeauducq 2019-04-08 23:45:30 +08:00
parent c74c25f938
commit bcfc9ea471
3 changed files with 21 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{ pkgs ? import <nixpkgs> {}}:
let
pkgs = import <nixpkgs> {};
artiqSrc = <artiqSrc>;
generatedNix = pkgs.runCommand "generated-nix" { buildInputs = [ pkgs.nix pkgs.git ]; }
''
@ -34,6 +34,8 @@ let
# This is in the example in the ARTIQ manual - precompile it to speed up
# installation for users.
matplotlib-qt = pkgs.lib.hydraJob (pkgs.python3Packages.matplotlib.override { enableQt = true; });
# For Raspberry Pi JTAG servers
openocd-aarch64 = pkgs.lib.hydraJob ((import <nixpkgs> { system = "aarch64-linux"; }).callPackage ./artiq/pkgs/openocd.nix {});
};
in
jobs // {

View File

@ -68,6 +68,10 @@
extraGroups = ["networkmanager" "wheel" "plugdev" "dialout" "lp" "scanner"];
uid = 1000;
};
users.extraUsers.nix = {
isNormalUser = true;
uid = 1001;
};
security.sudo.wheelNeedsPassword = false;
services.udev.packages = [ pkgs.openocd ];
services.udev.extraRules = ''
@ -89,6 +93,7 @@ ACTION=="add", SUBSYSTEM=="tty", \
nixpkgs.config.allowUnfree = true;
nix.distributedBuilds = true;
nix.buildMachines = [
{
hostName = "localhost";
@ -96,6 +101,13 @@ ACTION=="add", SUBSYSTEM=="tty", \
system = "x86_64-linux";
supportedFeatures = ["big-parallel"];
}
{
hostName = "rpi-1";
sshUser = "nix";
sshKey = "/home/nix/.ssh/id_rsa";
maxJobs = 1;
system = "aarch64-linux";
}
];
services.hydra = {
enable = true;

View File

@ -27,12 +27,16 @@ in
time.timeZone = "Asia/Hong_Kong";
users.extraGroups.plugdev = { };
security.sudo.wheelNeedsPassword = false;
users.extraUsers.sb = {
isNormalUser = true;
extraGroups = ["wheel" "plugdev" "dialout"];
uid = 1000;
};
security.sudo.wheelNeedsPassword = false;
users.extraUsers.nix = {
isNormalUser = true;
uid = 1001;
};
services.udev.packages = [ m-labs.openocd ];
environment.systemPackages = with pkgs; [
@ -41,4 +45,5 @@ in
nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];
nix.binaryCaches = ["https://cache.nixos.org" "https://nixbld.m-labs.hk"];
nix.trustedUsers = ["root" "nix"];
}