From 22824420c9fe3a97cb6873ea1b3600933f09cc4b Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 19 Oct 2023 08:35:03 +0200 Subject: [PATCH] Configure colmena for remote deployments --- flake.nix | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/flake.nix b/flake.nix index 092200e..ecf4a65 100644 --- a/flake.nix +++ b/flake.nix @@ -179,19 +179,18 @@ inherit nixpkgs; }; }; - drone = { lib, ... }: { - deployment = { - targetHost = "10.0.0.202"; - targetUser = "root"; + } // builtins.listToAttrs (map + (machine: { + name = machine; + value = { + deployment = { + targetHost = machines.${machine}.deploy.host; + targetUser = "root"; # machines.${machine}.deploy.sshUser; + }; + imports = self.lib.systemModules (machines.${machine}.system or "x86_64-linux") machines.${machine}.config; }; - imports = - let - system = "x86_64-linux"; - systemConfig = import ./machines/drone/configuration.nix inputs; - in - self.lib.systemModules system systemConfig; - }; - }; + }) + (builtins.filter (machine: machines.${machine} ? deploy) (builtins.attrNames machines))); }; @@ -241,11 +240,11 @@ just pciutils - (cryptsetup.override { - withInternalArgon2 = true; - }) + cryptsetup disko.packages.${system}.disko + + colmena ]; };