2019-01-31 23:39:38 +01:00
|
|
|
let
|
2020-10-28 21:43:33 +01:00
|
|
|
inherit (import ./lib/default.nix) sshPort;
|
|
|
|
|
|
2019-11-26 20:16:57 +01:00
|
|
|
gitFromJson = path:
|
2020-06-10 17:37:25 +02:00
|
|
|
let object = importJson path;
|
|
|
|
|
in {
|
|
|
|
|
inherit (object) url;
|
|
|
|
|
ref = object.rev;
|
|
|
|
|
};
|
2019-12-27 23:57:12 +01:00
|
|
|
krops = builtins.fetchGit (gitFromJson .versions/krops.json);
|
2019-01-31 23:39:38 +01:00
|
|
|
lib = import "${krops}/lib";
|
2020-06-10 17:37:25 +02:00
|
|
|
pkgs = import "${krops}/pkgs" { };
|
|
|
|
|
importJson = (import <nixpkgs> { }).lib.importJSON;
|
2019-01-31 23:39:38 +01:00
|
|
|
|
2020-10-18 17:28:45 +02:00
|
|
|
regularSystem = { path, name, address }: {
|
2020-06-10 17:37:25 +02:00
|
|
|
source = lib.evalSource [{
|
|
|
|
|
niveum.file = toString ./.;
|
|
|
|
|
system.file = toString path;
|
|
|
|
|
nixos-config.symlink = "system/configuration.nix";
|
2019-10-26 13:43:30 +02:00
|
|
|
|
2021-03-30 23:18:56 +02:00
|
|
|
nixpkgs.git = gitFromJson .versions/nixpkgs.json // { shallow = true; };
|
2021-05-03 14:32:34 +02:00
|
|
|
nixpkgs-unstable.git = gitFromJson .versions/nixpkgs-unstable.json // { shallow = true; };
|
2020-06-10 17:37:25 +02:00
|
|
|
home-manager.git = gitFromJson .versions/home-manager.json;
|
|
|
|
|
stockholm.git = gitFromJson .versions/stockholm.json;
|
2020-10-18 17:27:43 +02:00
|
|
|
retiolum.git = gitFromJson .versions/retiolum.json;
|
2020-09-24 19:25:47 +02:00
|
|
|
system-secrets.pass = {
|
2020-10-20 21:59:29 +02:00
|
|
|
dir = toString ~/.password-store;
|
|
|
|
|
name = "systems/${name}";
|
2020-06-10 17:37:25 +02:00
|
|
|
};
|
2020-09-24 19:25:47 +02:00
|
|
|
secrets.pass = {
|
2020-06-10 17:37:25 +02:00
|
|
|
dir = toString ~/.password-store;
|
|
|
|
|
name = "shared";
|
|
|
|
|
};
|
|
|
|
|
}];
|
2020-10-28 21:43:33 +01:00
|
|
|
target = "root@${address}:${toString sshPort}";
|
2019-04-10 21:14:29 +02:00
|
|
|
};
|
2020-01-18 17:10:47 +01:00
|
|
|
inherit (pkgs.krops) writeDeploy;
|
2019-06-17 18:01:14 +02:00
|
|
|
in {
|
2020-10-28 21:56:14 +01:00
|
|
|
zaatar = writeDeploy "deploy-zaatar" (regularSystem {
|
|
|
|
|
path = systems/zaatar;
|
|
|
|
|
name = "zaatar";
|
2020-11-10 22:17:33 +01:00
|
|
|
address = "zaatar.r";
|
2020-10-18 17:28:45 +02:00
|
|
|
});
|
|
|
|
|
wilde = writeDeploy "deploy-wilde" (regularSystem {
|
|
|
|
|
path = systems/wilde;
|
|
|
|
|
name = "wilde";
|
|
|
|
|
address = "wilde.r";
|
|
|
|
|
});
|
|
|
|
|
toum = writeDeploy "deploy-toum" (regularSystem {
|
|
|
|
|
path = systems/toum;
|
|
|
|
|
name = "toum";
|
2020-10-20 21:59:29 +02:00
|
|
|
address = "toum.r";
|
2021-03-30 23:18:56 +02:00
|
|
|
}) // {
|
|
|
|
|
buildTarget = "${builtins.getEnv "USER"}@localhost/${builtins.getEnv "HOME"}/.cache/krops";
|
|
|
|
|
};
|
2020-10-31 20:51:25 +01:00
|
|
|
makanek = writeDeploy "deploy-makanek" (regularSystem {
|
|
|
|
|
path = systems/makanek;
|
|
|
|
|
name = "makanek";
|
2020-11-03 20:18:57 +01:00
|
|
|
address = "makanek.r";
|
2020-10-31 20:51:25 +01:00
|
|
|
});
|
2020-11-05 21:28:23 +01:00
|
|
|
manakish = writeDeploy "deploy-manakish" (regularSystem {
|
|
|
|
|
path = systems/manakish;
|
|
|
|
|
name = "manakish";
|
2020-11-06 10:52:30 +01:00
|
|
|
address = "manakish.r";
|
2020-11-05 21:28:23 +01:00
|
|
|
});
|
2019-01-31 23:39:38 +01:00
|
|
|
}
|