make it eval
This commit is contained in:
parent
9ce55f46f4
commit
6fbe58a327
32
examples/default.nix
Normal file
32
examples/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{ nixpkgs, system, buildbot-nix, ... }:
|
||||||
|
let
|
||||||
|
# some example configuration to make it eval
|
||||||
|
dummy = { config, ... }: {
|
||||||
|
networking.hostName = "example-common";
|
||||||
|
system.stateVersion = config.system.nixos.version;
|
||||||
|
users.users.root.initialPassword = "fnord23";
|
||||||
|
boot.loader.grub.devices = lib.mkForce [ "/dev/sda" ];
|
||||||
|
fileSystems."/".device = lib.mkDefault "/dev/sda";
|
||||||
|
};
|
||||||
|
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
inherit (lib) nixosSystem;
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# General
|
||||||
|
example-master = nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
dummy
|
||||||
|
buildbot-nix.nixosModules.buildbot-master
|
||||||
|
];
|
||||||
|
};
|
||||||
|
example-worker = nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
dummy
|
||||||
|
buildbot-nix.nixosModules.buildbot-worker
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
14
flake.nix
14
flake.nix
|
@ -7,14 +7,24 @@
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ flake-parts, ... }:
|
outputs = inputs@{ self, flake-parts, ... }:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
|
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
|
||||||
systems = lib.systems.flakeExposed;
|
systems = lib.systems.flakeExposed;
|
||||||
flake = {
|
flake = {
|
||||||
nixosModules.buildbot-master = ./nix/master.nix;
|
nixosModules.buildbot-master = ./nix/master.nix;
|
||||||
nixosModules.buildbot-worker = ./nix/worker.nix;
|
nixosModules.buildbot-worker = ./nix/worker.nix;
|
||||||
|
|
||||||
|
nixosConfigurations = import ./examples {
|
||||||
|
inherit (inputs) nixpkgs;
|
||||||
|
buildbot-nix = self;
|
||||||
|
system = "x86_64-linux";
|
||||||
};
|
};
|
||||||
perSystem = { pkgs, ... }: {
|
checks.x86_64-linux = {
|
||||||
|
nixos-master = self.nixosConfigurations.example-master.config.system.build.toplevel;
|
||||||
|
nixos-worker = self.nixosConfigurations.example-worker.config.system.build.toplevel;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
perSystem = { pkgs, system, ... }: {
|
||||||
packages.default = pkgs.mkShell {
|
packages.default = pkgs.mkShell {
|
||||||
packages = [
|
packages = [
|
||||||
pkgs.bashInteractive
|
pkgs.bashInteractive
|
||||||
|
|
Loading…
Reference in a new issue