Skip to content

Commit

Permalink
switch to effect for darwin ssh deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Jan 14, 2024
1 parent 1abf777 commit 87de2b1
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 62 deletions.
62 changes: 0 additions & 62 deletions .github/workflows/darwin.yml

This file was deleted.

35 changes: 35 additions & 0 deletions dev/effect.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ self, withSystem, ... }:
{
herculesCI = { config, ... }:
withSystem "x86_64-linux" ({ hci-effects, pkgs, ... }:
{
onPush.default.outputs.effects = hci-effects.runIf (config.repo.ref == "refs/heads/master")
{
darwin02 = hci-effects.runNixDarwin {
ssh.destination = "[email protected]";
configuration = self.darwinConfigurations.darwin02;
buildOnDestination = true;
secretsMap.ssh-deployment = "ssh-deployment";
userSetupScript = ''
writeSSHKey ssh-deployment
cat >>~/.ssh/known_hosts <<EOF
darwin02.nix-community.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICJqwpMUEl1/iwrBakeDb1rlheXlE5mfDLICVz8w6yi6
EOF
'';
};
darwin03 = hci-effects.runNixDarwin {
ssh.destination = "[email protected]";
configuration = self.darwinConfigurations.darwin03;
buildOnDestination = true;
secretsMap.ssh-deployment = "ssh-deployment";
userSetupScript = ''
writeSSHKey ssh-deployment
cat >>~/.ssh/known_hosts <<EOF
darwin03.nix-community.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKX7W1ztzAtVXT+NBMITU+JLXcIE5HTEOd7Q3fQNu80S
EOF
'';
};
};
}
);
}
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
imports = [
inputs.hercules-ci-effects.flakeModule
inputs.treefmt-nix.flakeModule
./dev/effect.nix
];

perSystem = { config, inputs', lib, pkgs, self', system, ... }:
Expand Down

0 comments on commit 87de2b1

Please sign in to comment.