also test buildbot on aarch64-linux

This commit is contained in:
Jörg Thalheim 2023-09-15 09:10:02 +02:00
parent aeffb167fe
commit d10a73c666
2 changed files with 32 additions and 24 deletions

View file

@ -1,4 +1,4 @@
{ nixpkgs, system, srvos, buildbot-nix, disko, ... }: { nixpkgs, system, buildbot-nix, ... }:
let let
# some example configuration to make it eval # some example configuration to make it eval
dummy = { config, modulesPath, ... }: { dummy = { config, modulesPath, ... }: {
@ -15,7 +15,7 @@ let
inherit (lib) nixosSystem; inherit (lib) nixosSystem;
in in
{ {
example-master = nixosSystem { "example-master-${system}" = nixosSystem {
inherit system; inherit system;
modules = [ modules = [
dummy dummy
@ -44,7 +44,7 @@ in
buildbot-nix.nixosModules.buildbot-master buildbot-nix.nixosModules.buildbot-master
]; ];
}; };
example-worker = nixosSystem { "example-worker-${system}" = nixosSystem {
inherit system; inherit system;
modules = [ modules = [
dummy dummy

View file

@ -9,28 +9,36 @@
}; };
outputs = inputs@{ self, flake-parts, ... }: outputs = inputs@{ self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: { flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }:
systems = [ "x86_64-linux" ]; {
flake = { systems = [ "x86_64-linux" "aarch64-linux" ];
nixosModules.buildbot-master = ./nix/master.nix; flake = {
nixosModules.buildbot-worker = ./nix/worker.nix; nixosModules.buildbot-master = ./nix/master.nix;
nixosModules.buildbot-worker = ./nix/worker.nix;
nixosConfigurations = import ./examples { nixosConfigurations =
inherit (inputs) nixpkgs srvos disko; let
buildbot-nix = self; examplesFor = system: import ./examples {
system = "x86_64-linux"; inherit system;
inherit (inputs) nixpkgs;
buildbot-nix = self;
};
in
examplesFor "x86_64-linux" // examplesFor "aarch64-linux";
}; };
checks.x86_64-linux = { perSystem = { self', pkgs, system, ... }: {
nixos-master = self.nixosConfigurations.example-master.config.system.build.toplevel; packages.default = pkgs.mkShell {
nixos-worker = self.nixosConfigurations.example-worker.config.system.build.toplevel; packages = [
pkgs.bashInteractive
];
};
checks =
let
nixosMachines = lib.mapAttrs' (name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel) ((lib.filterAttrs (_: config: config.pkgs.system == system)) self.nixosConfigurations);
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
in
nixosMachines // packages // devShells;
}; };
}; });
perSystem = { pkgs, system, ... }: {
packages.default = pkgs.mkShell {
packages = [
pkgs.bashInteractive
];
};
};
});
} }