Fix errors

This commit is contained in:
Gabriel DORIATH DOHLER 2021-07-28 23:39:01 +02:00
parent 8cff6168b5
commit 818c6aa542

View file

@ -1,22 +1,20 @@
let let
krops = builtins.fetchGit { krops = builtins.fetchGit { url = "https://cgit.krebsco.de/krops/"; };
url = "https://cgit.krebsco.de/krops/";
};
lib = import "${krops}/lib"; lib = import "${krops}/lib";
pkgs = import "${krops}/pkgs" {}; pkgs = import "${krops}/pkgs" { };
source = machine: lib.evalSource [ source = machine:
{ lib.evalSource [{
config.file = toString ./machines; config.file = toString ./machines;
nixos-config.symlink = "config/${machine}/configuration.nix"; nixos-config.symlink = "config/${machine}/configuration.nix";
nixpkgs.git = { nixpkgs.git = {
clean.exclude = [ "/.version-suffix" ]; clean.exclude = [ "/.version-suffix" ];
ref = "973910f5c31b9ba6c171c33a8bd7199990b14c72"; # nixos-21.05 ref = "973910f5c31b9ba6c171c33a8bd7199990b14c72"; # nixos-21.05
url = https://github.com/NixOS/nixpkgs; url = "https://github.com/NixOS/nixpkgs";
}; };
} }];
]; mkTestConfig = hostname: {
mkTestConfig = hostname: name = "test-${hostname}";
test-${hostname}-01 = pkgs.krops.writeTest "test-${hostname}" { value = pkgs.krops.writeTest "test-${hostname}" {
source = source hostname; source = source hostname;
target = lib.mkTarget { target = lib.mkTarget {
host = "localhost"; host = "localhost";
@ -24,12 +22,11 @@ let
}; };
force = true; # force create the sentinel file. force = true; # force create the sentinel file.
}; };
mkTestsConfig = hostnames: };
builtins.listToAttrs (map (h: { name = h; value = mkTestConfig h; }) hostnames); mkTestsConfig = hostnames: builtins.listToAttrs (map mkTestConfig hostnames);
in in {
{ core-services-01 = pkgs.krops.writeDeploy "deploy-core-services-01" {
core-services-01 = pkgs.krops.writeDeploy "deploy-core-services-01" { source = source "core-services-01";
source = source "core-services-01"; target = "root@core01.internal.rz.ens.wtf";
target = "root@core01.internal.rz.ens.wtf"; };
}; } // mkTestsConfig [ "core-services-01" "remote-builder-01" ]
} // mkTestsConfig [ "core-services-01" "remote-builder-01" ]