infrastructure/flake.nix

40 lines
1.2 KiB
Nix
Raw Normal View History

2021-10-13 16:49:41 +02:00
{
description = "Delft Deployment";
inputs.deploy-rs.url = "github:serokell/deploy-rs";
2021-10-17 12:38:16 +02:00
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
2021-10-13 16:49:41 +02:00
outputs = { self, nixpkgs, deploy-rs }: {
nixosConfigurations.bastion = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ ./hosts/bastion/configuration.nix ];
};
2021-10-17 12:38:16 +02:00
nixosConfigurations.template = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
2021-10-17 13:00:47 +02:00
modules = [ "${nixpkgs}/nixos/modules/virtualisation/lxc-container.nix" ./hosts/template/configuration.nix ];
2021-10-17 12:38:16 +02:00
};
2021-10-13 18:17:45 +02:00
deploy.nodes.bastion = {
2021-10-13 16:49:41 +02:00
hostname = "localhost";
fastConnection = true;
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.bastion;
};
};
2021-10-17 12:38:16 +02:00
deploy.nodes.template = {
sshUser = "root";
hostname = "10.42.42.5";
fastConnection = true;
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.template;
};
};
2021-10-13 18:17:45 +02:00
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
2021-10-13 16:49:41 +02:00
};
}