️ use deploy-rs from nixpkgs

This commit is contained in:
2024-01-26 17:00:00 -05:00
parent aa4ed46e50
commit d87221ed37
5 changed files with 42 additions and 31 deletions

View File

@ -1,4 +1,4 @@
{ self, pkgs, system, pre-commit-hooks, ... }:
{ self, system, deploy-rs, pre-commit-hooks, ... }:
{
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
@ -8,4 +8,4 @@
statix.enable = true;
};
};
} // (pkgs.deploy-rs.lib.deployChecks self.deploy)
} // (deploy-rs.lib.${system}.deployChecks self.deploy)

View File

@ -1,9 +1,21 @@
{ self, deploy-rs, ... }:
{ self, nixpkgs, deploy-rs, ... }:
let
mkDeploy = hostName:
let
inherit (self.hosts.${hostName}) type address system sshUser;
inherit (deploy-rs.lib.${system}) activate;
pkgs = import nixpkgs { inherit system; };
deployPkgs = import nixpkgs {
inherit system;
overlays = [
deploy-rs.overlay
(_self: super: {
deploy-rs = {
inherit (pkgs) deploy-rs; inherit (super.deploy-rs) lib;
};
})
];
};
inherit (deployPkgs.deploy-rs.lib) activate;
in
{
hostname = address;

View File

@ -2,7 +2,7 @@
default = pkgs.mkShell {
name = "athens";
buildInputs = with pkgs; [
deploy-rs.deploy-rs
deploy-rs
deadnix
doctl
nil