2022-11-13 01:06:12 +00:00
|
|
|
{
|
|
|
|
description = "Homelab configuration tools";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, flake-parts, ... }:
|
|
|
|
flake-parts.lib.mkFlake { inherit self; } {
|
|
|
|
systems = [ "x86_64-linux" "aarch64-darwin" ];
|
2022-11-13 23:16:12 +00:00
|
|
|
perSystem = { config, self', inputs', pkgs, system, ... }:
|
|
|
|
let
|
|
|
|
to-docker-compose = pkgs.writeShellApplication {
|
|
|
|
name = "to-docker-compose";
|
|
|
|
runtimeInputs = [ pkgs.jsonnet ];
|
|
|
|
text = ''
|
|
|
|
jsonnet services.jsonnet \
|
|
|
|
--tla-code secrets="{
|
|
|
|
PLEX_CLAIM: '$PLEX_CLAIM',
|
|
|
|
ADVERTISE_IP: '$ADVERTISE_IP',
|
|
|
|
}"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [ jsonnet to-docker-compose ];
|
|
|
|
};
|
2022-11-13 01:06:12 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|