infrastructure/flake.nix

53 lines
1.5 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 21:02:20 +02:00
nixosConfigurations.k3s = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ ./hosts/k3s/configuration.nix ];
};
2021-10-17 15:14:53 +02:00
nixosConfigurations.vault = nixpkgs.lib.nixosSystem {
2021-10-17 12:38:16 +02:00
system = "x86_64-linux";
2021-10-17 15:14:53 +02:00
modules = [ "${nixpkgs}/nixos/modules/virtualisation/lxc-container.nix" ./hosts/vault/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 21:02:20 +02:00
deploy.nodes.k3s-node1 = {
hostname = "10.42.42.10";
fastConnection = true;
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.k3s;
};
};
2021-10-17 15:14:53 +02:00
deploy.nodes.vault = {
hostname = "10.42.42.6";
2021-10-17 12:38:16 +02:00
fastConnection = true;
profiles.system = {
user = "root";
2021-10-17 15:14:53 +02:00
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.vault;
2021-10-17 12:38:16 +02:00
};
};
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
};
}