2020-04-03 22:49:45 +02:00
|
|
|
let
|
|
|
|
krops = builtins.fetchGit {
|
|
|
|
url = "https://cgit.krebsco.de/krops/";
|
|
|
|
};
|
|
|
|
lib = import "${krops}/lib";
|
|
|
|
pkgs = import "${krops}/pkgs" {};
|
|
|
|
|
|
|
|
hostSource = path:
|
|
|
|
lib.evalSource [ {
|
|
|
|
nixpkgs.git = {
|
|
|
|
ref = "origin/nixos-20.03";
|
|
|
|
url = "https://github.com/NixOS/nixpkgs-channels.git";
|
|
|
|
};
|
|
|
|
nixpkgs-unstable.git = {
|
|
|
|
ref = "origin/master";
|
|
|
|
url = "https://github.com/NixOS/nixpkgs.git";
|
|
|
|
};
|
|
|
|
nixos-config.file = toString (./hosts + "/${path}/configuration.nix");
|
2020-04-14 20:58:04 +02:00
|
|
|
this-host.file = toString (./hosts + "/${path}");
|
2020-04-03 22:49:45 +02:00
|
|
|
lib.file = toString ./lib;
|
|
|
|
secrets.file = toString ./secrets;
|
|
|
|
"host-registry.nix".file = toString ./host-registry.nix;
|
|
|
|
} ];
|
|
|
|
|
|
|
|
deployContainer = containerName: host:
|
|
|
|
pkgs.krops.writeDeploy containerName {
|
|
|
|
source = hostSource "containers/${containerName}";
|
|
|
|
target = "root@${host}";
|
|
|
|
};
|
|
|
|
in {
|
2020-04-04 01:39:01 +02:00
|
|
|
scrape = deployContainer "scrape" "172.20.73.32";
|
2020-04-03 22:49:45 +02:00
|
|
|
ledstripes = deployContainer "ledstripes" "172.22.99.168";
|
2020-04-05 02:31:57 +02:00
|
|
|
freifunk = deployContainer "freifunk" "172.20.72.40";
|
2020-04-03 22:49:45 +02:00
|
|
|
}
|