mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-24 00:56:16 +01:00
b6b9e09535
Signed-off-by: main <magic_rb@redalder.org>
74 lines
2.8 KiB
Nix
74 lines
2.8 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
|
|
|
nixng = {
|
|
url = "github:nix-community/NixNG";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
website = {
|
|
url = "git+https://gitea.redalder.org/Magic_RB/website";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
camptules = {
|
|
url = "git+https://gitea.redalder.org/ThyW/camptules";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, nixng, ... }@inputs:
|
|
with nixpkgs.lib;
|
|
let
|
|
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
|
forAllSystems' = systems: fun: nixpkgs.lib.genAttrs systems fun;
|
|
forAllSystems = forAllSystems' supportedSystems;
|
|
|
|
pkgsForSystem = system:
|
|
import nixpkgs { inherit system; };
|
|
in
|
|
{
|
|
nixngSystems =
|
|
let base = { nglib = nixng.nglib nixpkgs.lib; inherit nixpkgs; };
|
|
in
|
|
{ hydra = (import ./containers/hydra.nix base).hydra;
|
|
hydraPostgresql = (import ./containers/hydra.nix base).postgresql;
|
|
ingressToothpick = import ./containers/ingress-toothpick.nix base;
|
|
ingressBlowhole = import ./containers/ingress-blowhole.nix base;
|
|
website = import ./containers/website.nix (base // { inherit (inputs.website) website; });
|
|
camptules = (import ./containers/camptules.nix (base // { inherit (inputs) camptules; }));
|
|
gitea = import ./containers/gitea.nix base;
|
|
minecraft = import ./containers/minecraft.nix base;
|
|
mosquitto = import ./containers/mosquitto.nix base;
|
|
dovecot = import ./containers/dovecot.nix base;
|
|
getmail = import ./containers/getmail base;
|
|
syncthing = import ./containers/syncthing.nix base;
|
|
zigbee2mqtt = import ./containers/zigbee2mqtt.nix base;
|
|
home-assistant = import ./containers/home-assistant.nix base;
|
|
reicio = import ./containers/reicio.nix base;
|
|
baikal = import ./containers/baikal.nix base;
|
|
conduit = import ./containers/conduit.nix base;
|
|
mautrix-facebook = import ./containers/mautrix-facebook.nix base;
|
|
heisenbridge = import ./containers/heisenbridge.nix base;
|
|
};
|
|
|
|
hydraJobs =
|
|
let
|
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
|
makeJob = container:
|
|
container.config.system.build.toplevel;
|
|
in
|
|
nixpkgs.lib.mapAttrs (n: v: makeJob v) self.nixngSystems;
|
|
|
|
|
|
devShell = forAllSystems (system:
|
|
let pkgs = pkgsForSystem system;
|
|
in
|
|
pkgs.mkShell {
|
|
nativeBuildInputs = with pkgs;
|
|
[ nomad_1_3 consul vault packer jq terraform
|
|
];
|
|
}
|
|
);
|
|
};
|
|
}
|