1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00
Files
niveum/deploy.nix

64 lines
1.8 KiB
Nix
Raw Normal View History

2019-01-31 23:39:38 +01:00
let
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
2020-06-10 17:37:25 +02:00
nixpkgs.git = gitFromJson .versions/nixpkgs.json;
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 = {
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";
};
}];
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";
address = "192.168.178.21";
2020-10-18 17:28:45 +02:00
});
homeros = writeDeploy "deploy-homeros" (regularSystem {
path = systems/homeros;
name = "homeros";
address = "homeros.r";
});
wilde = writeDeploy "deploy-wilde" (regularSystem {
path = systems/wilde;
name = "wilde";
address = "wilde.r";
});
toum = writeDeploy "deploy-toum" (regularSystem {
path = systems/toum;
name = "toum";
address = "toum.r";
2020-10-18 17:28:45 +02:00
});
2020-10-31 20:51:25 +01:00
makanek = writeDeploy "deploy-makanek" (regularSystem {
path = systems/makanek;
name = "makanek";
address = "88.99.83.173";
});
2019-01-31 23:39:38 +01:00
}