distribute aarch64 openocd
This commit is contained in:
parent
c74c25f938
commit
bcfc9ea471
4
main.nix
4
main.nix
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs ? import <nixpkgs> {}}:
|
|
||||||
let
|
let
|
||||||
|
pkgs = import <nixpkgs> {};
|
||||||
artiqSrc = <artiqSrc>;
|
artiqSrc = <artiqSrc>;
|
||||||
generatedNix = pkgs.runCommand "generated-nix" { buildInputs = [ pkgs.nix pkgs.git ]; }
|
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
|
# This is in the example in the ARTIQ manual - precompile it to speed up
|
||||||
# installation for users.
|
# installation for users.
|
||||||
matplotlib-qt = pkgs.lib.hydraJob (pkgs.python3Packages.matplotlib.override { enableQt = true; });
|
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
|
in
|
||||||
jobs // {
|
jobs // {
|
||||||
|
|
|
@ -68,6 +68,10 @@
|
||||||
extraGroups = ["networkmanager" "wheel" "plugdev" "dialout" "lp" "scanner"];
|
extraGroups = ["networkmanager" "wheel" "plugdev" "dialout" "lp" "scanner"];
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
};
|
};
|
||||||
|
users.extraUsers.nix = {
|
||||||
|
isNormalUser = true;
|
||||||
|
uid = 1001;
|
||||||
|
};
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
services.udev.packages = [ pkgs.openocd ];
|
services.udev.packages = [ pkgs.openocd ];
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
|
@ -89,6 +93,7 @@ ACTION=="add", SUBSYSTEM=="tty", \
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
nix.distributedBuilds = true;
|
||||||
nix.buildMachines = [
|
nix.buildMachines = [
|
||||||
{
|
{
|
||||||
hostName = "localhost";
|
hostName = "localhost";
|
||||||
|
@ -96,6 +101,13 @@ ACTION=="add", SUBSYSTEM=="tty", \
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
supportedFeatures = ["big-parallel"];
|
supportedFeatures = ["big-parallel"];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
hostName = "rpi-1";
|
||||||
|
sshUser = "nix";
|
||||||
|
sshKey = "/home/nix/.ssh/id_rsa";
|
||||||
|
maxJobs = 1;
|
||||||
|
system = "aarch64-linux";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
services.hydra = {
|
services.hydra = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -27,12 +27,16 @@ in
|
||||||
time.timeZone = "Asia/Hong_Kong";
|
time.timeZone = "Asia/Hong_Kong";
|
||||||
|
|
||||||
users.extraGroups.plugdev = { };
|
users.extraGroups.plugdev = { };
|
||||||
|
security.sudo.wheelNeedsPassword = false;
|
||||||
users.extraUsers.sb = {
|
users.extraUsers.sb = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel" "plugdev" "dialout"];
|
extraGroups = ["wheel" "plugdev" "dialout"];
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
};
|
};
|
||||||
security.sudo.wheelNeedsPassword = false;
|
users.extraUsers.nix = {
|
||||||
|
isNormalUser = true;
|
||||||
|
uid = 1001;
|
||||||
|
};
|
||||||
services.udev.packages = [ m-labs.openocd ];
|
services.udev.packages = [ m-labs.openocd ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
@ -41,4 +45,5 @@ in
|
||||||
|
|
||||||
nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];
|
nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];
|
||||||
nix.binaryCaches = ["https://cache.nixos.org" "https://nixbld.m-labs.hk"];
|
nix.binaryCaches = ["https://cache.nixos.org" "https://nixbld.m-labs.hk"];
|
||||||
|
nix.trustedUsers = ["root" "nix"];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue