-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
38 lines (34 loc) · 1.16 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
description = "A NixOS module for Jenkins, optimized specifically for running projects using Nix.";
inputs = {
jenkinsPlugins2nix.url = "github:Fuuzetsu/jenkinsPlugins2nix";
flake-outputs.url = "github:nix-systems/flake-outputs";
devour-flake.url = "github:srid/devour-flake";
devour-flake.flake = false;
};
outputs = inputs: {
overlay = self: super: {
flake-outputs = inputs.flake-outputs.packages.${self.system}.default;
devour-flake = self.callPackage inputs.devour-flake { };
jenkinsPlugins2nix = inputs.jenkinsPlugins2nix.packages.${if self.system == "aarch64-darwin" then "x86_64-darwin" else self.system}.jenkinsPlugins2nix;
};
nixosModules = rec {
# The common module will work on NixOS and macOS alike.
common = { flake, pkgs, ... }: {
nixpkgs.overlays = [ inputs.self.overlay ];
};
# The default NixOS module.
default = {
imports = [
common
./nix/jenkins
];
};
};
# Modules to use in nix-darwin
darwinModules = {
default = inputs.self.nixosModules.common;
slave = ./nix/jenkins/slave/macos.nix;
};
};
}