Declare hydraJobs

This commit is contained in:
Ehmry - 2022-05-28 12:37:23 -05:00
parent fa659c0b02
commit de41914adc
3 changed files with 23 additions and 8 deletions

View File

@ -1,6 +1,8 @@
# Iowa City mesh imagebuilder
Not tested yet but hopefully it can build sysupgrade images for multiple devices at once.
Automated builds available here: https://hydra.hq.c3d2.de/project/meshic
## Building
Needs lots of open files to build some stuff:
``` nix

View File

@ -50,11 +50,11 @@
"openwrt": "openwrt"
},
"locked": {
"lastModified": 1653663077,
"narHash": "sha256-tXTrdT6Lru6TmRer/7wWp5sXUbNLlV79cO5dPPhgBaU=",
"lastModified": 1653748867,
"narHash": "sha256-EqtHrfcrbSfpHdXHVlvllrXydmr6vKIbBVYpHbdwsv8=",
"owner": "IowaCityMesh",
"repo": "nix-openwrt-imagebuilder",
"rev": "e59021b707a646b9cd05edb2e9b2d183bf2d55b4",
"rev": "381746799c6604706c5e591dcac3aeb3a64af30b",
"type": "github"
},
"original": {

View File

@ -3,30 +3,41 @@
"github:IowaCityMesh/nix-openwrt-imagebuilder";
outputs = { self, nixpkgs, openwrt-imagebuilder }:
let inherit (nixpkgs) lib;
let
inherit (nixpkgs) lib;
sshAuthorizedKeys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCqAXBEROEfldkHdUbF3TinBhfeX5l4DQ/5MAOhLh09avqCqcHY2FanZN+qmWpD695UZ71Cl+XF6Bj0KO7Rt4SAemvkEDPMBoidkt+ZjLsdnb8GVvbDhu/62JnqW9meYTN5GcjfmKMPDtKFbgSx9PPcjsDaO6LI/GWeyTz+EYQqwTdc7TKffjLXp6bREYLf0oKIBTvW9/oPCBI7ywYmyBaadFKrYSnujJbMejH91L+JN2fJoxjjhsGcRR78ottbjz4q6JxYjt9CG5oa7Lm60xdZkiiA3c4dMuHU9+EWGshjBKL1Fb9BafeAKhHobcs7UG8IVlqHRJC5VAGQlmus/fNagAArz9PnGW4MAOgg+yLjQJLLKqePBMsAsMHZ9XT+sqPyJfcai5dWynGXFP1B63C/oosVMkeZAlBIwDz/CmufpKBCJZXCfFoC3PotWsH/JT3ir/RSdtVHQ169CEgm+AUd7gjBuRwn6j2eBHcYkn0nCbQ93KLPlnYCLXzjByGved8= emery@zuni"
];
in {
packages = lib.attrsets.mapAttrs (system: pkgs:
let
profiles = openwrt-imagebuilder.lib.profiles { inherit pkgs; };
customConfig = {
# add package to include in the image, ie. packages that you don't
# want to install manually later
packages = [ "batman-adv" ];
packages = [ ];
disabledServices = [ "dnsmasq" ];
disabledServices = [ ]; # dnsmasq
# include files in the images.
# to set UCI configuration, create a uci-defauts scripts as per
# official OpenWRT ImageBuilder recommendation.
files = pkgs.runCommandNoCC "image-files" { } ''
mkdir -p $out/etc/uci-defaults
cat > $out/etc/uci-defaults/99-custom <<EOF
cat > $out/etc/uci-defaults/99-custom << EOF
uci -q batch << EOI
set system.@system[0].hostname='meshic-testrouter'
set wireless.@wifi-iface[0].ssid='MeshIC'
commit
EOI
EOF
mkdir -p $out/etc/dropbear
cat > $out/etc/dropbear/authorized_keys << EOF
${lib.strings.concatStringsSep "\n" sshAuthorizedKeys}
EOF
'';
};
in {
@ -35,6 +46,8 @@
(profiles.identifyProfile "trendnet_tew-691gr" // customConfig);
}) { inherit (nixpkgs.legacyPackages) x86_64-linux; };
hydraJobs = self.packages.x86_64-linux;
};
}