Declare hydraJobs
This commit is contained in:
parent
fa659c0b02
commit
de41914adc
|
@ -1,6 +1,8 @@
|
||||||
# Iowa City mesh imagebuilder
|
# 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:
|
Needs lots of open files to build some stuff:
|
||||||
``` nix
|
``` nix
|
||||||
|
|
|
@ -50,11 +50,11 @@
|
||||||
"openwrt": "openwrt"
|
"openwrt": "openwrt"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1653663077,
|
"lastModified": 1653748867,
|
||||||
"narHash": "sha256-tXTrdT6Lru6TmRer/7wWp5sXUbNLlV79cO5dPPhgBaU=",
|
"narHash": "sha256-EqtHrfcrbSfpHdXHVlvllrXydmr6vKIbBVYpHbdwsv8=",
|
||||||
"owner": "IowaCityMesh",
|
"owner": "IowaCityMesh",
|
||||||
"repo": "nix-openwrt-imagebuilder",
|
"repo": "nix-openwrt-imagebuilder",
|
||||||
"rev": "e59021b707a646b9cd05edb2e9b2d183bf2d55b4",
|
"rev": "381746799c6604706c5e591dcac3aeb3a64af30b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
21
flake.nix
21
flake.nix
|
@ -3,30 +3,41 @@
|
||||||
"github:IowaCityMesh/nix-openwrt-imagebuilder";
|
"github:IowaCityMesh/nix-openwrt-imagebuilder";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, 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 {
|
in {
|
||||||
|
|
||||||
packages = lib.attrsets.mapAttrs (system: pkgs:
|
packages = lib.attrsets.mapAttrs (system: pkgs:
|
||||||
let
|
let
|
||||||
profiles = openwrt-imagebuilder.lib.profiles { inherit pkgs; };
|
profiles = openwrt-imagebuilder.lib.profiles { inherit pkgs; };
|
||||||
|
|
||||||
customConfig = {
|
customConfig = {
|
||||||
# add package to include in the image, ie. packages that you don't
|
# add package to include in the image, ie. packages that you don't
|
||||||
# want to install manually later
|
# want to install manually later
|
||||||
packages = [ "batman-adv" ];
|
packages = [ ];
|
||||||
|
|
||||||
disabledServices = [ "dnsmasq" ];
|
disabledServices = [ ]; # dnsmasq
|
||||||
|
|
||||||
# include files in the images.
|
# include files in the images.
|
||||||
# to set UCI configuration, create a uci-defauts scripts as per
|
# to set UCI configuration, create a uci-defauts scripts as per
|
||||||
# official OpenWRT ImageBuilder recommendation.
|
# official OpenWRT ImageBuilder recommendation.
|
||||||
files = pkgs.runCommandNoCC "image-files" { } ''
|
files = pkgs.runCommandNoCC "image-files" { } ''
|
||||||
mkdir -p $out/etc/uci-defaults
|
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
|
uci -q batch << EOI
|
||||||
set system.@system[0].hostname='meshic-testrouter'
|
set system.@system[0].hostname='meshic-testrouter'
|
||||||
|
set wireless.@wifi-iface[0].ssid='MeshIC'
|
||||||
commit
|
commit
|
||||||
EOI
|
EOI
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
mkdir -p $out/etc/dropbear
|
||||||
|
cat > $out/etc/dropbear/authorized_keys << EOF
|
||||||
|
${lib.strings.concatStringsSep "\n" sshAuthorizedKeys}
|
||||||
|
EOF
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
@ -35,6 +46,8 @@
|
||||||
(profiles.identifyProfile "trendnet_tew-691gr" // customConfig);
|
(profiles.identifyProfile "trendnet_tew-691gr" // customConfig);
|
||||||
|
|
||||||
}) { inherit (nixpkgs.legacyPackages) x86_64-linux; };
|
}) { inherit (nixpkgs.legacyPackages) x86_64-linux; };
|
||||||
|
|
||||||
|
hydraJobs = self.packages.x86_64-linux;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user