pkgs/device-templates: exclude all ap* from all-device-scripts

This commit is contained in:
Astro 2022-06-23 23:11:56 +02:00
parent 469caa0858
commit 10b8faeb23
3 changed files with 10 additions and 12 deletions

View File

@ -75,7 +75,7 @@
"all-device-scripts" = hydraJob;
"export-config" = exportFileWrapper;
"switch-.*" = exportFileWrapper;
"ap.*" = exportFileWrapper;
"ap.*-image" = exportFileWrapper;
};
in
builtins.mapAttrs (name: pkg:

View File

@ -71,7 +71,10 @@ let
openwrt = import ./openwrt { inherit self nixpkgs system openwrt-imagebuilder; };
openwrt-images = builtins.foldl' (images: hostName: images // {
openwrt-packages = builtins.foldl' (images: hostName: images // {
${hostName} = pkgs.writeScriptBin "${hostName}.sh" (
openwrt.sshScript hostName
);
"${hostName}-image" = openwrt.buildImage hostName;
}) {} (
builtins.attrNames (
@ -101,7 +104,7 @@ let
inherit self nixpkgs system;
};
in
rootfs-packages // vm-packages // device-templates // openwrt-images // network-graphs // network-cypher-graphs // starlink // subnetplans // {
rootfs-packages // vm-packages // device-templates // openwrt-packages // network-graphs // network-cypher-graphs // starlink // subnetplans // {
inherit export-openwrt-models export-config dns-slaves
encrypt-secrets decrypt-secrets switch-to-production
vlan-report

View File

@ -11,18 +11,13 @@ let
args = {
inherit self hostName config hostConfig pkgs;
};
in {
ap = openwrt.sshScript hostName;
switch = import (./switches + "/${model}.nix")
(args //
import ./switches/shared.nix args
);
}.${role}
in import (./switches + "/${model}.nix") (
args // import ./switches/shared.nix args
)
)
) (
filterAttrs (_: { role, model, ... }:
role == "ap" ||
(role == "switch" && model != "dumb")
role == "switch" && model != "dumb"
) config.site.hosts
);