flakes/lib/deploy-rs/default.nix
Chinmay D. Pai 3a3a8afe30
feat: add nixos configuration based on snowfall-lib
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 18:31:19 +05:30

27 lines
585 B
Nix

{ inputs }:
let
inherit (inputs) deploy-rs;
in
{
mkDeploy =
{ self }:
let
hosts = self.nixosConfigurations or { };
nodes = builtins.mapAttrs (_: machine: {
hostname = machine.config.networking.hostName;
fastConnection = true;
remoteBuild = false;
autoRollback = false;
magicRollback = false;
profiles.system = {
user = "root";
sshUser = "root";
path = deploy-rs.lib.${machine.pkgs.system}.activate.nixos machine;
};
}) hosts;
in
{
inherit nodes;
};
}