add other servers

This commit is contained in:
Ingolf Wagner 2021-09-25 20:30:49 +02:00
parent 15c6866362
commit 79f72d1ee1
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -29,6 +29,21 @@ let
"flake.lock".file = toString ./flake.lock;
};
server = { name, host }:
let
system = writeCommand "/bin/system" {
source = lib.evalSource [ source ];
force = true;
target = lib.mkTarget "root@${host}/var/krops";
inherit command;
};
in {
"${name}" = pkgs.writers.writeBashBin name ''
echo "deploy system"
${system}/bin/system
'';
};
desktop = { name, host }:
let
system = writeCommand "/bin/system" {
@ -60,4 +75,16 @@ let
'';
};
in (desktop { name = "sterni"; host = "sterni.private"; })
in (desktop {
name = "sterni";
host = "sterni.private";
}) // (server {
name = "pepe";
host = "pepe.private";
}) // (server {
name = "workhorse";
host = "workhorse.private";
}) // (server {
name = "sputnik";
host = "sputnik.private";
})