buildbot-nix/flake.nix

40 lines
1.3 KiB
Nix
Raw Normal View History

2023-09-10 08:22:33 +00:00
{
# https://github.com/Mic92/buildbot-nix
description = "A nixos module to make buildbot a proper Nix-CI.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
2023-09-10 11:16:33 +00:00
srvos.url = "github:numtide/srvos";
srvos.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
2023-09-10 08:22:33 +00:00
flake-parts.url = "github:hercules-ci/flake-parts";
};
2023-09-10 11:16:33 +00:00
outputs = inputs@{ self, srvos, flake-parts, ... }:
2023-09-10 08:22:33 +00:00
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
2023-09-10 10:11:50 +00:00
systems = [ "x86_64-linux" ];
2023-09-10 08:22:33 +00:00
flake = {
nixosModules.buildbot-master = ./nix/master.nix;
nixosModules.buildbot-worker = ./nix/worker.nix;
2023-09-10 09:16:51 +00:00
nixosConfigurations = import ./examples {
2023-09-10 11:16:33 +00:00
inherit (inputs) nixpkgs srvos disko;
2023-09-10 09:16:51 +00:00
buildbot-nix = self;
system = "x86_64-linux";
};
checks.x86_64-linux = {
nixos-master = self.nixosConfigurations.example-master.config.system.build.toplevel;
nixos-worker = self.nixosConfigurations.example-worker.config.system.build.toplevel;
};
2023-09-10 08:22:33 +00:00
};
2023-09-10 09:16:51 +00:00
perSystem = { pkgs, system, ... }: {
2023-09-10 08:22:33 +00:00
packages.default = pkgs.mkShell {
packages = [
pkgs.bashInteractive
];
};
};
});
}