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
|
||||
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 // {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue