2021-01-11 18:35:35 +01:00
|
|
|
{
|
|
|
|
inputs = {
|
2021-10-17 22:21:32 +02:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
2021-01-11 18:35:35 +01:00
|
|
|
|
2021-06-09 23:07:43 +02:00
|
|
|
nixng = {
|
2022-03-23 10:37:15 +01:00
|
|
|
url = "github:nix-community/NixNG";
|
2021-06-09 23:07:43 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
website = {
|
|
|
|
url = "git+https://gitea.redalder.org/Magic_RB/website";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-10-17 22:21:32 +02:00
|
|
|
camptules = {
|
|
|
|
url = "git+https://gitea.redalder.org/ThyW/camptules";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-01-11 18:35:35 +01:00
|
|
|
};
|
|
|
|
|
2021-05-03 20:30:40 +02:00
|
|
|
outputs = { self, nixpkgs, nixng, ... }@inputs:
|
|
|
|
with nixpkgs.lib;
|
|
|
|
let
|
2021-08-18 22:14:16 +02:00
|
|
|
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
|
|
|
forAllSystems' = systems: fun: nixpkgs.lib.genAttrs systems fun;
|
|
|
|
forAllSystems = forAllSystems' supportedSystems;
|
|
|
|
|
2022-06-01 08:41:51 +02:00
|
|
|
pkgsForSystem = system:
|
|
|
|
import nixpkgs { inherit system; };
|
2021-05-03 20:30:40 +02:00
|
|
|
in
|
2022-06-01 08:41:51 +02:00
|
|
|
{
|
|
|
|
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;
|
2022-06-05 12:59:42 +02:00
|
|
|
baikal = import ./containers/baikal.nix base;
|
2022-09-18 18:24:43 +02:00
|
|
|
conduit = import ./containers/conduit.nix base;
|
2022-09-19 13:51:54 +02:00
|
|
|
mautrix-facebook = import ./containers/mautrix-facebook.nix base;
|
2022-06-01 08:41:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
2022-09-18 18:24:43 +02:00
|
|
|
[ nomad_1_3 consul vault packer jq terraform
|
2022-06-01 08:41:51 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
2021-01-11 18:35:35 +01:00
|
|
|
}
|